-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High resolution icon #1987
High resolution icon #1987
Conversation
Before this change, release.sh built some native stuff, and Makefile.CrossWindows built the Windows releases. Instead, use a single release.make to build the whole release. It also avoids to build the server one more time.
Finding a local file in the scrcpy directory may be useful for files other than scrcpy-server in the future.
230afd8
to
a467339
Compare
The downscaled 512×512 icon looks bad on Windows. But SDL does not expose a way to provide an icon set for each resolution 😕 |
@rom1v Hi, i try draw icon for scrcpy in papirus style...
It's can be modify with shadows or other effetcts:
|
Use the new icon designed by @varlesh: <#1987 (comment)> Attempt to use the SVG, and fallback to PNG.
20e54a8
to
236cd4f
Compare
Use the new icon designed by @varlesh: <#1987 (comment)> Load it from a PNG file (SDL only supports bitmap icons).
In fact, SDL only support bitmap images for window icon, so there is no need to load it from an SVG (which is not always available with FFmpeg). Instead, now, I only use a 256x256 PNG image: I also added the icon on the main page (on this branch): https://github.com/Genymobile/scrcpy/blob/icon.6/README.md |
ok, use as you want ) |
Use the new icon designed by @varlesh: <#1987 (comment)> Load it from a PNG file (SDL only supports bitmap icons).
Merged into This icon will be the official scrcpy icon from the next release 🎉 Thank you very much! |
@varlesh Could you please set the logo on the scrcpy wikipedia page? When uploading an image, wikipedia requires to check the box I am the author of this work. 😉 |
No problem,added
https://commons.wikimedia.org/wiki/File:Scrcpy_logo.svg
вс, 14 нояб. 2021 г. в 19:39, Romain Vimont ***@***.***>:
… @varlesh <https://github.com/varlesh> Could you please set the logo on
the scrcpy wikipedia page <https://en.wikipedia.org/wiki/Scrcpy>?
When uploading an image, wikipedia requires to check the box *I am the
author of this work*. 😉
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1987 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5VTD7NBYNCBKTT6QVUVETUL7JZJANCNFSM4VE66LNA>
.
|
There are two problems with the scrcpy icon:
This PR aims to fix the latter.
Why was the icon in 48×48?
For the initial release of scrcpy, to set an icon quickly (and in a funny way), I used an XPM:
icon.xpm
.I explained here: https://blog.rom1v.com/2018/03/introducing-scrcpy/#set-a-window-icon
I use XFCE, and the icons are never shown at a higher resolution, so it was not a problem for me. However, when the icon is displayed at a bigger size, the quality is awful: #1497.
Icon format
To support a higher resolution icon, I had to use another format.
SDL expects a packed (non-planar) bitmap format, so I choose PNG (but other formats could be supported).
To avoid adding a new dependency, I implemented icon loading using FFmpeg (which is not the most straightforward way to just load an image!). For simplicity, I only implemented support for RGB-like input.
The icon is read from a file, either in
/usr/share/icons/hicolor/512x512/apps/scrcpy.png
or justicon.png
for portable builds (i.e. Windows). LikeSCRCPY_SERVER_PATH
, an environment variable allows to customize the icon path:SCRCPY_ICON_PATH
. The main purpose is to be able to execute./run x
to run a build without installing.Debug mode
To easily distinguish debug builds, I used to change the icon color (because it was simple and funny):
scrcpy/app/src/tiny_xpm.c
Lines 40 to 43 in 431c9ee
To keep things simple with a real image, I will just abandon this debug-specific change.
TODO
I'd like to add support for palette formats ((DONE)AV_PIX_FMT_PAL8
), in particular because it's the format produced byoptipng
if I optimize the current icon.