Page 1 of 1

IM lowers color depth when I don't want it to

Posted: 2016-02-08T07:30:22-07:00
by posfan12
I am using the following command on a 24bit input file:

Code: Select all

convert "%ImgPath%\Walls_Misc00.png" -crop 64x96+0+32! "%ImgPath%\Walls_Misc00_crop.png"
However, the result is an 8bit image. How do I make it so that the image stays 24bit? Thanks!

Version: ImageMagick 6.9.2-6 Q16 x64 2015-11-14 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib cairo freetype jng jp2 jpeg lcms lqr openexr pangoca
iro png ps rsvg tiff webp xml zlib

Re: IM lowers color depth when I don't want it to

Posted: 2016-02-08T07:52:25-07:00
by snibgo
Prefix the output filename with PNG24: like this:

Code: Select all

convert "%ImgPath%\Walls_Misc00.png" -crop 64x96+0+32! "PNG24:%ImgPath%\Walls_Misc00_crop.png"

Re: IM lowers color depth when I don't want it to

Posted: 2016-02-08T08:39:29-07:00
by posfan12
That worked, thanks.