Page 1 of 1

.png to .tif resulting in blank page

Posted: 2019-10-24T05:03:51-07:00
by RAmbika
Hi,

When we try to convert the .png file shared in the below link to tif it results in a blank page.

https://drive.google.com/file/d/1Jsp5cr ... sp=sharing

the command we are using is:
Convert.exe <InputFile> -monochrome <OutputFile>

Please have a look into it and let us know how can we resolve this.

Thanks,
Ambika

Re: .png to .tif resulting in blank page

Posted: 2019-10-24T06:49:41-07:00
by snibgo
I don't know what result you want. Perhaps use "-threshold 50%" instead of "-monochrome".

Re: .png to .tif resulting in blank page

Posted: 2019-10-24T09:21:47-07:00
by fmw42
What is your Imagemagick version and platform/OS? Your command works reasonably for me on IM 6.9.10.68 Q16 Mac OSX. The image is not totally black or blank.

Re: .png to .tif resulting in blank page

Posted: 2019-10-25T08:46:24-07:00
by Sebbaz
Hello,

I have the same issue with IM 7.0.8-2 Q16 x64 on Windows 7 Enterprise edition SP1
Tried also with IM 7.0.9-0 Q16 : https://framapic.org/gallery#rAO3rnS4tO ... OH2dLz.TIF

Maybe there is a link with issue 1627 ? https://github.com/ImageMagick/ImageMagick/issues/1627

Re: .png to .tif resulting in blank page

Posted: 2019-10-25T09:25:34-07:00
by fmw42
-monochrome works for me with IM 7.0.8.68 Q16 Mac OSX. Except it loses the alpha channel. I have tried all the -define tiff:alpha options. I have tried -type options with alpha. I have tried turning off the alpha and then on again after -monochrome. Nothing keeps the alpha. Perhaps that is how it works with -monochrome.

Image

Code: Select all

magick hosted_with_lutim.png -monochrome hosted_with_lutim.tif
Image

Re: .png to .tif resulting in blank page

Posted: 2019-11-28T02:29:00-07:00
by RAmbika
Hi,

The tiff image which is produced with the below command is not in ccitt group 4 tiff file format

magick hosted_with_lutim.png -monochrome hosted_with_lutim.tif

Could you please provide us some alternative solution for this?

Thanks,
Ambika

Re: .png to .tif resulting in blank page

Posted: 2019-11-28T02:58:27-07:00
by snibgo

Re: .png to .tif resulting in blank page

Posted: 2019-12-30T02:48:56-07:00
by Ganesh_B
Hi Snibgo,

RAmbika & myself work in same team. Previously you mentioned <Perhaps use "-threshold 50%" instead of "-monochrome".>

So basing on that we are able to get good TIFF output using - 'Magick::Image::threshold()'.

Please let us know what is the issue with input image that adjusting Threshold is making good output. Is there any field of the input image from 'Magick::Image' object that can be read to differentiate with this input image from others. That is, we wanted to know what is the Field(input image) that has value that is not correct or resulting in this output.

Regards,
Ganesh.
(25057991)

Re: .png to .tif resulting in blank page

Posted: 2019-12-30T12:01:33-07:00
by fmw42
-monochrome had a bug. Please upgrade to the latest version of ImageMagick and try again. Use -compress Group4 before saving the tiff as suggested by snibgo.

Re: .png to .tif resulting in blank page

Posted: 2020-01-13T07:01:09-07:00
by RAmbika
Hi,

When we integrate the binaries generated with latest version(7.0.9.16) in our code we are getting an exception.
Please check below screenshot.
https://drive.google.com/file/d/1DhOEpm ... sp=sharing

Could you please help us to resolve this issue?

Thanks,
Ambika

Re: .png to .tif resulting in blank page

Posted: 2020-01-13T10:23:24-07:00
by fmw42
This command works fine for me on 7.0.9.16 Mac OSX Sierra

Code: Select all

magick IMG_20191001_150941.png -monochrome -compress group4 x.tif
What was your exact command line?

Re: .png to .tif resulting in blank page

Posted: 2020-01-29T03:11:07-07:00
by RAmbika
Hi,
ImageMagick API is throwing an "Access violation" exception. Please find the console application at the below path to replicate the issue. We are using 32 bit imagemagick binaries generated from ImageMagick-7.0.9-19 version.
https://drive.google.com/file/d/1hP0TEN ... sp=sharing

Our Environment:
Window 7 OS
Visual Studio 2017

Please have a look into it and let us know how can we resolve this?