It is currently April 14th, 2021, 2:26 am

ImageMagick convert hard to get

Post reviews, recommendations and questions about other software.
User avatar
Active Colors
Posts: 682
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

ImageMagick convert hard to get

Post by Active Colors »

I'm currently struggling with convert function of ImageMagick.
I have a folder with various .png files.
By various I mean each of them has different image bit depth.
In my command I specify this folder and convert all of the png files to one .ico file.
On the output I get one .ico file with all the .png files in it.

Everything is good except:
The image bit depth becomes 32 bit on all the images inside the .ico.
This is a serious problem since Windows requires to have multiple similar icons with different image bit-depths.

What I want to do is to preserve original image bit depth.

Another problem is: ImageMagick has different "views" on the depth. The bit depth in Windows which is needed to consider is depth per image (I suppose), but in ImageMagick the bit depth is depth per channel.

Is there a simple way to tell ImageMagick to take all properties of the source image and convert the image keeping the source properties? As I said I have a folder with images of different depths and manually identifying that is too much trouble, thus I would like it to automatically do that.

My current command:
convert Prepare\*.png Export\icon.ico

I have attached 3 images of different bit depths.

To see the bit depth, if you use Windows, click right mouse button, choose properties, open details tab.
You do not have the required permissions to view the files attached to this post.