also works from the command-line-fu:
sips -s format icns /path/to/the/picture.png --out /path/to/the/picture.icnsThis makes .icns files out of every* picture, jpeg, png, tif etc...
* as long as it's either 128x128, 256x256 or 512x512 pixel.
Preview.app can't convert pictures to icons that don't have exactly one of these three sizes, converting a 400x400 icon will fail for example.
How about implementing this into the Wineskin icon setting?
Code checks either if:
- normal .icns like now and copy into Wrapper (currently only this works in WS)
- if it's a picture, let sips work with the pic to make a .icns file, then import into Wrapper
- if it's picture and sips fails because pic hasn't got 128x128, 256x256 or 512x512, then no .icns file will be created and Wineskin will notice no .icns file and say: picture has not the right dimensions (the 3 above), can't make .icns file from it.
sips will create an invisible temp file for the icon in the same dir, if the conversion suceeds, the inv. temp file will be moved to the icon name, if it fails, the inv. temp file will still be there however. remove via rm or whatever if the conversion fails.
works both in Leopard and Snow.
Weird thing is, Leopard Preview.app doesn't have the .icns export functionality, only the one in Snow has. Seems like Leopard Preview.app doesn't take advantage of sips...