another inconsistency in string format syntax

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

another inconsistency in string format syntax

Post by fmw42 »

I am finding a slight inconsistency when using identify vs convert in how string formats are handled. Basically if there are multiple frames in the image, identify runs the results together onto one long string return, but convert lists them on separate lines. Thus to fix this, I have to add \n when using identify.

For example:

convert -delay 200 rose: -delay 10 rose: rose_an.gif

using convert syntax:
shortinfo="%f[%s] %m %Tticks %wx%h %P%O %r %z-bit %Q%% %b"
convert rose_an.gif -format "$shortinfo" info:
rose_an.gif[0] GIF 200ticks 70x46 70x46+0+0 PseudoClassRGB 8-bit 0% 0
rose_an.gif[1] GIF 10ticks 70x46 70x46+0+0 PseudoClassRGB 8-bit 0% 0

using identify syntax:
shortinfo="%f[%s] %m %Tticks %wx%h %P%O %r %z-bit %Q%% %b"
identify -format "$shortinfo" rose_an.gif
rose_an.gif[0] GIF 200ticks 70x46 70x46+0+0 PseudoClassRGB 8-bit 0% 7575rose_an.gif[1] GIF 10ticks 70x46 70x46+0+0 PseudoClassRGB 8-bit 0% 7575

fix to identify syntax:
shortinfo="%f[%s] %m %Tticks %wx%h %P%O %r %z-bit %Q%% %b \n"
identify -format "$shortinfo" rose_an.gif
rose_an.gif[0] GIF 200ticks 70x46 70x46+0+0 PseudoClassRGB 8-bit 0% 7575
rose_an.gif[1] GIF 10ticks 70x46 70x46+0+0 PseudoClassRGB 8-bit 0% 7575
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: another inconsistency in string format syntax

Post by magick »

Fixed in the subversion trunk. Thanks.
Post Reply