Page 1 of 1

Crop file larger than orginal because image was changed

Posted: 2007-09-20T09:51:54-07:00
by troyd1
I have an 8 bit png image that is 1838x1238. I did the following:
convert orig.png -crop 1800x1200+19+19 +repage crop.png

I also did:

convert orig.png -shave 19x19 shave.png

both resulting images are identical I believe, but the orig.png was an 8 bit image, and the new images are a 16 bit images. I believe this is why the files are larger. Please shed some light on this and if I need to/can keep the image at 8 bit, how do I do that. I am running version 6.3.5.q16.

Thanks, Troy

Re: Crop file larger than orginal because image was changed

Posted: 2007-09-20T11:12:43-07:00
by Bonzo
Resizing a png as a test the 16bit file was 8x larger than the 8bit.

From a previous post try saving as png8:crop.png which should keep the image as 8bit.

Re: Crop file larger than orginal because image was changed

Posted: 2007-09-20T11:21:57-07:00
by troyd1
Worked like a charm. Thanks!

Re: Crop file larger than orginal because image was changed

Posted: 2007-09-24T20:16:13-07:00
by anthony
WARNING: png8; is equivelent to GIF. It uses a 256 color limited pallette.

If you want 8bit value images and thus a 24 bit image, use png24:
OR add -depth 8 to the command line.