convert: improper image header #4193
Replies: 8 comments 1 reply
-
|
Your tiff file does not have some required field Photometric Interpretation, which has no default value. https://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html When I tried to open your file in Gimp, it says: Could not get photometric from 'MRK_16.tif'. Image is CCITT compressed, assuming min-is-white However, imagemagick do not assume it, so got an error. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for your response but it also failing with this [tomcat@tmng-alfresco6-1 ~]$ convert -define quantum:polarity=photometric-interpretation=min-is-white /Alftemp/MRK_16.tif /Alftemp/16.png |
Beta Was this translation helpful? Give feedback.
-
|
I don't know whether that -define should work or not. % tiffset -s 262 0 MRK_16.tif set the value, then you can convert it with imagemagick. |
Beta Was this translation helpful? Give feedback.
-
|
Any fix with convert? |
Beta Was this translation helpful? Give feedback.
-
|
I also tried to use set with convert but result is same [tomcat@tmng-alfresco6-1 ~]$ convert -set 262 0 /Alftemp/MRK_16.tif /Alftemp/16.png |
Beta Was this translation helpful? Give feedback.
-
|
I don't think this would be fixed. In short, it is not necessary to handle broken file. -define quantum:polarity=photometric-interpretation=min-is-white should be -define quantum:polarity=min-is-white, anyway that does not work. It seems that -define is applied to output file. IMHO, it is not a bad idea to provide some option that can supply missing information, or overwrite the value of input file when reading though. |
Beta Was this translation helpful? Give feedback.
-
|
You know what same image is working fine in old version of Magic - Version: ImageMagick 6.7.8-9 2018-12-11 Q16 http://www.imagemagick.org its workingwith the given version |
Beta Was this translation helpful? Give feedback.
-
|
As far as I understand, CCITT Group4 compression does not require min-is-white. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Using convert command line tool to convert tiff to PNG and facing below given error
convert: improper image header `/Alftemp/MRK_16.tif' @ error/tiff.c/ReadTIFFImage/1440.
Steps to Reproduce
[tomcat@tmng-alfresco6-1 ~]$ convert -quiet /Alftemp/MRK_16.tif /Alftemp/16.png
convert: improper image header
/Alftemp/MRK_16.tif' @ error/tiff.c/ReadTIFFImage/1440. convert: no images defined/Alftemp/16.png' @ error/convert.c/ConvertImageCommand/3285.System Configuration
MRK_16 (1).zip
Beta Was this translation helpful? Give feedback.
All reactions