Page 1 of 1

convert: invalid profile length

Posted: 2015-03-29T18:21:36-07:00
by Don
Hello there,

I am trying to run a series of commands to achieve an effect and I get the following error using the image at the dropbox link below:

Commands:

convert imacApple.jpg \( -clone 0 -fill \"#330000\" -colorize 100% \) \( -clone 0 -colorspace Gray -negate \) -compose blend -define compose:args=100,0 -composite result.png

convert result.png -modulate 150,80,100 -gamma 1.2 -contrast -contrast result.png

The error:
convert: invalid profile length result.png @ warning/png.c/MagickPNGWarningHandler/1671.

Image:
https://www.dropbox.com/s/w12kjsjqxhhjz ... e.jpg?dl=0

Just to note: I updated to the latest version of IM as I thought doing so would remove the warning error.

Thanks.

Re: convert: invalid profile length

Posted: 2015-03-29T20:00:43-07:00
by snibgo
It's just a warning. The processing continues. If it worries you, use +profile "*" in the first convert.

The file imacApple.jpg contains an iptc profile of zero length. The first convert accepts this, and copies it to the png file. The second convert reads the png file, and png software warns about the profile.

This seems inconsistent behaviour by ImageMagick.

Re: convert: invalid profile length

Posted: 2015-03-29T22:35:05-07:00
by Don
The +profile "*" helped. :)

Thank you for your response and explanation on the warning.