Problems Outputting to TIF

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
aneiman

Problems Outputting to TIF

Post by aneiman »

I've searched through the forum but haven't seen someone having the same problem and that the proposed solution solves my problem. I've also posted to the mail list but I haven't had much luck either. If I've missed something, please point it out! :)

I'm trying to redact (cover sensitive information with a big black box) a TIF image and save into a new TIF image. One of the proposed solutions was to specify a compression scheme. (i.e. -compression lzw) This doesn't work for me.

Here's the command I'm trying to use:

Code: Select all

convert white.tif -fill black -draw "rectangle 15,15 210,45" -compress lzw white2.tif
If I change the type of white2.tif to white2.jpg, it works. I ran the command with -verbose, but nothing seemed out of place.

More info:

Code: Select all

convert -version
Version: ImageMagick 6.2.8 06/30/06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC
This is all on Windows XP. Also, here's the image I was working with: http://www.eng.utoledo.edu/~aneiman/white.tif
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Your command worked for us. We're using the very latest 6.2.8 Windows binaries dated just a few days ago.
aneiman

Post by aneiman »

I redownloaded & reinstalled the latest Windows binary off of the site and it didn't fix anything with my original command.

Thanks, mckuehl. I tried running your command, but this produced some interesting results. First off, the TIF isn't editable using Paint, nor am I able to preview using the Windows Picture & Fax Viewer. I am able to open it using the IMDisplay program. I can view the TIF in a browser, but that's through the Quicktime plugin. (I've tried unchecking the option to display TIFs through the plugin but that didn't make it display without the plugin. That's a different matter altogether, so don't worry about it.) Any ideas?

Here's the output if I run mckuehl's command. http://www.eng.utoledo.edu/~aneiman/white-8bitdepth.tif
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Many TIFF applications only handle a restricted set of TIFF image types. Try adding
  • +matte -depth 8 -compress none
to your command line to create a TIFF image type that most applications can deal with.
aneiman

Post by aneiman »

Thank you both a thousand times over. I was able to get a valid TIF with the extra options you gave me magick. I narrowed it down to the +matte, which seems to fix it all.
Post Reply