Convert -Draw breaks 1bit Tiff

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
ukanalyst
Posts: 2
Joined: 2017-01-26T06:33:53-07:00
Authentication code: 1151

Convert -Draw breaks 1bit Tiff

Post by ukanalyst »

Hi all,

I'm hoping someone can help me out. I have a 1 bit TIF that I'm drawing a rectangle on using convert like this:

convert.exe ImageIn.tif -draw "rectangle 696,1484,1913,2064" ImageOut.tif

This works for many images but when I process the image in the link below, I can't open the resulting file with an image viewer suggesting some sort of corruption.

I've tried with three versions of ImageMagick including the latest:

Version: ImageMagick 7.0.4-5 Q16 x64 2017-01-21 http://www.imagemagick.org

Here's the input image:

https://www.dropbox.com/s/n0i4w2h6206dc ... n.tif?dl=0

and here's the resulting image:

https://www.dropbox.com/s/4jol1hlt62kfz ... t.tif?dl=0

I have tried using the -depth 8 switch and this creates a file I can use but the file is reported by Windows as 32bit and it's much larger in size. I have also tried using the -monochrome switch which works perfectly but I need to process Grayscale and monochrome images and want to keep the file size as small as possible.

Any help would be much appreciated!

Cheers

Dave
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Convert -Draw breaks 1bit Tiff

Post by magick »

Until we get a chance to properly debug your command, add the '-alpha off' option just before your output filename. That should return expected results.
ukanalyst
Posts: 2
Joined: 2017-01-26T06:33:53-07:00
Authentication code: 1151

Re: Convert -Draw breaks 1bit Tiff

Post by ukanalyst »

WOW, super speedy reply, thanks so much - that works perfectly!
Post Reply