Page 1 of 1

Resizing tiff smaller make image size grow a lot

Posted: 2007-03-09T14:33:17-07:00
by fendale2000
I have a tiff file that is quite small, and I want to resize, however when I do so the image size grows. I think the resize command is changing the color depth of my image (its a black and white image). Here is the output of identity of the before and after versions of the image:


$ identify example.tif
example.tif TIFF 1654x2339 1654x2339+0+0 DirectClass 1-bit 6.1875kb 0.070u 0:02
$ identify example.tif
example.tif TIFF 828x1200 828x1200+36+36 DirectClass 16-bit 169.73kb

So it looks like my image has changed from 1bit, to 16 bit. How can I get it to stay at 1 bit as it is resized?

The command I used to resize it was:

mogrify -resize 1200x1200 example.tif

Thanks for the help!

Re: Resizing tiff smaller make image size grow a lot

Posted: 2007-03-09T16:20:18-07:00
by fendale2000
I have found the -depth switch that seems to get the image back to 1bit, but while I got it to work correctly once, everytime I try it on a selection of images now, it inverts the image (white to black and black to white), very strange. Here is my command:

$ mogrify -resize 750x -depth 1 example.tif

Re: Resizing tiff smaller make image size grow a lot

Posted: 2007-03-15T13:33:51-07:00
by spieler
Add "-monochrome -compress group4" to your command. When you resize the tiff, it does things in a "smart" way and probably produces some gray pixels or the like. Forcing it back to monochrome AFTER the resize should do it.