Open MisterDA opened 10 years ago
May I add OUYA Coverflow (732x412px)?
To the issue I have made .ico
files with Gimp... You place the files in different layers (Open as layers does the trick) and then specify the bitdepth of each layer (8, 16, 24 or 32 bits) and WOALA! the .ico
file.
We need a software that can generate everything from a single .svg
file... that would be awesome!
ResourceHacker/Gimp had some troubles with some bitdepth/icon sizes so I couldn't generate nice results with it (probably my mistake using the software)
+1 to Ouya Cover. I'd really appreciate that :)
Could probably mark imagemagick as a dep, and use that.
Inkscape has export capabilities and PNG is supported
inkscape -C -w=$SIZE-h=$SIZE -e=icon$SIZEx$SIZE.png icon.svg
Then by checking whether to use iconutils or libicns you run the apropiate command to generate the .icns
And then process them with gimp or ImageMagic
I may be able to create a Script for GIMP but it might take some time
NOTE: In Inkscape I used the page export so everything should be fitted inside the page, also if the width and the height is not the same the image will be transformed in ugly ways (scaled to fit the square)
EDIT: A guy already did something similar with ImageMagick here
libicns doesnt support sizes bigger than 512 (when linked with Jasper) so the 512x2 and 1024 cant be generated that might be a problem too
I have found this script. This looks very, very, very promizing.
Hi folks!
So today I was making the official packages for my game and decided to also provide a deb. Works smoothly, great job! The only down side is that it looks bad in the menus with the Love icon instead of the game icon. So I made a few changes to the debian script to accept a --debian-icon file, put it in the right place (/usr/share/icons/.....) and change the .desktop to use it.
Would this be usefull or are you looking for something more advanced? Currently I'm only using a 128x128 icon, I don't know if its mandatory/adviseable to provide at least a few other sizes...
Well, it's a very good start. Truth is that I was to lazy to implement something.
The idea I have is that the user provides an image PNG/JPG, doesn't matter, which could be of the highest resolution possible, and then the script uses ImageMagick directly or IconImp, a Bash script reliying on ImageMagick that does everything we need (but does it do it well ?).
If you'd like to submit a push request, I'll gladly add your changes, and l'll add the whole functionality later.
Ok! My changes accept only a 128x128 icon, how many do we need anyway? In my own icons folder I have like 20 different resolutions for icons :/
So maybe the best way was to ask the user for a 256x256, and then automatically generate 3 or 4 scaled down versions? (128, 64, 32?)
My doubt is, if we are just scaling down an icon, isnt it enough to provide a big one and let the desktop environment/window managet/whatever do the scaling itself? i thought the the point of having different resolutions was if your icon sucked in different sizes and you need to have slightly differences in them to make them look good. if we are just rescaling, is it worth it?
Oh, yes, you are right...
So --icons
should point to a folder containing icons. They must have their resolution specified, like "32x32", "64x64" in the filename, but the filename itself doesn't matter.
By using a bit of regex, I should be able loop over the files, extract their resolution, and move them into the standard path. Then, they would be renamed to match the project's name.
This should cover Debian packages, as well as Android an OUYA coverflows.
Anyway, the user still needs to create by himself .ico
and .icns
files...
From a user point-of-view (and a lazy one :p) that seems like too much work just to get the icon. Can't it be easy and simple like in windows and mac? we could make optional arguments for other sizes, and keep just one of them mandatory, like --deb-icon-128 file128.png --deb-icon-32 file32.png
if you use a global --icon option to link to a dir where every icons would be stored, the script could even detect files ending with ".ico" or ".icns", and thus release at once executables + icons for Win/Mac/Deb
that's a great idea, using only one solution that fits all :)
One solution to rule them all...
Awesome :)
I've tried adding Icons. I created a new folder:
DebianIcons/
-- myapp.svg
-- myapp32x32.png
-- myapp64x64.png
I pass this directory using --Dicon ../DebianIcons/
But the menu entries get no icons... :( Am I doing something wrong?
No, it's love-release that is wrong... It is broken to the core. I should have written tests, but I had just began programming when I started developing love-release and I didn't know about them. I'm sorry it does'nt work out-of-the box (at all ?). If I have time I'll try to check what's going on, but in the meantime I'm trying to rewrite it in lua. Sorryy for the inconvenience. :/
Hey, no worries, it works like a charm. The only thing that doesn't is the icons, which isn't really a big thing. The whole project is really cool. I've been using it to generate the packages for trAInsported for a long time now. Looking forward to the new version!
Edit: The coolest thing is that it now supports .deb packages. Yay!
rcedit could be used instead of Resource Hacker for changing the Windows icon.
Soo... about icons... For now, the script supports four different plateforms, each one having its own way to deal with icons.
Let's start with this. The developer/graphist has made some PNGs files, each one with differents resolutions. Where does it stores them ? Let's ask with a
--icon
option that leads to the directory where theses files are stored..ico
.icns
OS X
Now, OS X imposes its naming scheme. There is no way to generate a valid .icns icon than to follow this.
Linux
In the meantime, Linux says that every PNG image should be named the same, and moved to a specific directory in
/usr/share/icons/hicolor/YYxYY/apps
, YY being the size of the canvas.Android
While for android, you simply replace the following images in the
res
folder with PNG's of the same size:OUYA
There are two icons that they OUYA system uses:
res/drawable-xhdpi/ouya_icon.png
, the size should be 732x412px)drawable-xhdpi/ic_launcher.png
)Windows
And finally, Windows...
name_A_BBxBBxC.png
where A is the counter of the PNGs, 1 for the lowest quality, BB the size of the canvas and C the image bitdepth (I guess). You can go further than 48x48, it's just an example.So... We have to find a way to make every thing work together. For now, if you put a
${PROJECT_NAME}.ico
or a${PROJECT_NAME}.icns
, the script will use them.The idea here is to put the PNGs files in one location, to find a common naming scheme and to let the script handles everything for every plateform.
The roadmap:
.icns
: needs to detect if running OS X, then use iconutil, else use libicns..ico
: needs to detect if running Bash in Windows.So... We're discussing (1) now !