Page 1 of 1

ImageMagick 7.x.x error attempt to set read-only property

Posted: 2016-06-24T01:23:17-07:00
by vorel
All ImageMagick 7.x.x versions unable to convert .png files generated by ​http://getfireshot.com/. Error message is:

convert image.png -verbose -resize '1258x1600' '/tmp/thumbtCXFSl'
image.png=>/tmp/thumbtCXFSl PNG 1903x2420=>1258x1600 1258x1600+0+0 8-bit sRGB 1.337MB 1.350u 0:00.419
convert: attempt to set read-only property `VERSION' @ error/property.c/SetImageProperty/4351.

Version: ImageMagick 7.0.2-1 Q16 x86_64 2016-06-24

All ImageMagick 6.x.x versions are capable of this.

https://postimg.org/image/bukm11zx3/

Re: ImageMagick 7.x.x error attempt to set read-only property

Posted: 2016-06-24T09:37:14-07:00
by glennrp
The VERSION keyword was invented by the author of the image, not by libpng. PNG text keywords can consist of any string of 1-79 Latin-1 characters. We'll need to find another way of storing comment keywords coming from PNG, GIF, JPEG, etc., images or from the "-label" or "-comment" option. I'm thinking of prefixing them with "png:keyword:", "COMMENT:", or "LABEL:".

Re: ImageMagick 7.x.x error attempt to set read-only property

Posted: 2016-06-24T09:47:01-07:00
by glennrp
Of those I prefer "LABEL:". So the image in question would be stored with the property "LABEL:VERSION= 1.8", "LABEL:CREATOR:= SCREENSHOT_STUDIO", etc.

Code: Select all

grep "comment" coders/*.c
grep "label" coders/*.c'
says this will be a fairly extensive job. Lots of formats use these.

Re: ImageMagick 7.x.x error attempt to set read-only property

Posted: 2016-06-27T07:18:38-07:00
by vorel
Thanks glenrp for your answer, I understand and that's very interesting. Do you rather prefer to use ImageMagick version 6? Converting images like this is bit important for us, maybe not only for us. Or is there any selector which could cut off keyword stored by automatic image creator? I tried -strip, but the result is the same (in version 6.x.x.x the keyword "VERSION 1.8" is striped from image).