Page 1 of 1

-fill +opaque operator alters size of image (MB)

Posted: 2015-03-13T14:57:16-07:00
by inwelkin@gmail.com
Hi,

I have a 140MB old.tif image, with 24 bit color depth. I used -fill +opaque operators to change one particular color in the image to a new one, and exported the resulting image new.tif. I saw two strange things:
(1) new.tif is 464MB, much bigger than old.tif. Why would this happen?
(2) new.tif is obviously also 24 bit in color depth. However, using -depth 8 on it is ineffective. The operation still yields a 24 bit image.
Please advice. These are both undesirable events for downstream processing...

Re: -fill +opaque operator alters size of image (MB)

Posted: 2015-03-13T15:02:28-07:00
by snibgo
What are the compression methods on the before and after files? "identify -verbose" will tell you. Perhaps the before file had jpeg compression, which was removed, because the default is not to lose data. Or perhaps you introduced a new colour, so a palette could no longer be used.

"-depth 8" means 8 bits/channel/pixel. There are 3 channels.

Re: -fill +opaque operator alters size of image (MB)

Posted: 2015-03-13T15:14:51-07:00
by inwelkin@gmail.com
You are right. Old image has packbits compression. Removed in new image. Thank you!