composite command generates huge TIFF file

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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: composite command generates huge TIFF file

Post by anthony »

Judging by the size the original document is pure black and white bitmap.

however creating text in IM generates a greyscale image (edges of the text are anti-aliased). you also used a semi-transparent font too. In any case the TIFF image is also grey scale, A huge grey scale.

You can turn off anti-alising using +antialias so the font generated will also only be black and white.

However I am not sure in IM will save TIFFs as a bitmap or not. Someone else may know.

Prehaps you should try just reading and writing the TIFF image without change, and see how IM effacts the unmodified image...

Code: Select all

convert   org/scan0002.tif -taint  check.tif
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: composite command generates huge TIFF file

Post by anthony »

Also IM stores all images as a minimum in RGB greyscale. As such a bitmap image has 3 bytes per pixel for IM Q8 and 6 bytes for IM Q16 That is a huge difference to a bitmap of 8 pixels per byte!

That is for IM Q16 your image will need at least 48 times the space it needed as a uncompressed bitmap disk file!!!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply