TIFF explodes in size

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
jturincs
Posts: 3
Joined: 2011-05-27T08:26:28-07:00
Authentication code: 8675308

TIFF explodes in size

Post by jturincs »

I am using ImageMagick 6.4.0 06/07/08 Q16 on an OpenSuse Linux system. I split a multi-page TIFF file using:
convert multipagetiff.tif -define quantum:polarity=min-is-white test2a_%d.tif
The single-page TIFFs are fine at this point. (I use the quantum:polarity to ensure the image shows up properly in the Windows picture viewer).

I then issue the following command to put a date watermark on the image:
convert test2a_0.tif -pointsize 60 -fill black -gravity northwest -annotate 270x270+40+480 "MM\DD\YYYY" test2b_0.tif
The input image was 22K and it explodes to 810K! I notice that the channel depth switches from 1-bit to 16/8-bit and it now has an alpha channel. I have tried the -alpha deactivate and tried various compression options, which either does not reduce the size, or creates an unreadable image. Any assistance would be greatly appreciated!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: TIFF explodes in size

Post by fmw42 »

Try combinations of the blue highlighted commands. I am assuming your tif file was all b/w (bilevel). The anti-aliasing of text probably causes the increase in depth (to grayscale) and any text operation such as label: caption: -draw and -annotate seem to add an alpha channel. The -depth 2 and -type bilevel may be redundant.

convert test2a_0.tif -pointsize 60 -fill black -gravity northwest +antialias -annotate 270x270+40+480 "MM\DD\YYYY" -alpha off -depth 2 -type bilevel test2b_0.tif

If that does not work, post a link to one of your tiff frames.
jturincs
Posts: 3
Joined: 2011-05-27T08:26:28-07:00
Authentication code: 8675308

Re: TIFF explodes in size

Post by jturincs »

I used the +antialias -alpha off -type bilevel options and it worked perfectly! Thank you very much for the information!
Post Reply