[magick-users] RE: rotated image different bit depth

Fred Weinhaus fmw at alink.net
Tue Mar 4 12:37:29 PST 2008


Try adding -depth 8 after your rotate before the output image (or 
whatever depth you want).





>When I use "-rotate" to rotate a 8-bit PNG, the result is 16-bit.  Is
>there a way to preserve bit-depth?
>
># before rotation
>robr at cartman[13:11:25][/tmp/cdmp/tmp/] file 
>PO09__1957_DEC_IONOGRAM_0010.png
>PO09__1957_DEC_IONOGRAM_0010.png: PNG image data, 4720 x 2368, 8-bit
>grayscale, non-interlaced
>
># rotate
>robr at cartman[13:11:31][/tmp/cdmp/tmp/] convert -rotate 180
>PO09__1957_DEC_IONOGRAM_0010.png PO09__1957_DEC_IONOGRAM_0010.png
>
># after rotation
>robr at cartman[13:11:49][/tmp/cdmp/tmp/] file 
>PO09__1957_DEC_IONOGRAM_0010.png
>PO09__1957_DEC_IONOGRAM_0010.png: PNG image data, 4720 x 2368, 16-bit
>grayscale, non-interlaced


More information about the Magick-users mailing list