Page 1 of 1

Problems Outputting to TIF

Posted: 2006-07-10T13:54:46-07:00
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
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC
This is all on Windows XP. Also, here's the image I was working with:

Posted: 2006-07-10T14:10:46-07:00
by magick
Your command worked for us. We're using the very latest 6.2.8 Windows binaries dated just a few days ago.

Posted: 2006-07-11T07:41:08-07:00
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.

Posted: 2006-07-11T10:08:46-07:00
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.

Posted: 2006-07-11T14:06:53-07:00
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.