convert: invalid profile length

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
Don
Posts: 47
Joined: 2013-05-09T14:10:43-07:00
Authentication code: 6789

convert: invalid profile length

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: convert: invalid profile length

Post 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.
snibgo's IM pages: im.snibgo.com
Don
Posts: 47
Joined: 2013-05-09T14:10:43-07:00
Authentication code: 6789

Re: convert: invalid profile length

Post by Don »

The +profile "*" helped. :)

Thank you for your response and explanation on the warning.
Post Reply