6.8.6-Q16 Identify with "-format %x" not returning Units

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
Taldos
Posts: 4
Joined: 2013-09-23T05:13:21-07:00
Authentication code: 6789

6.8.6-Q16 Identify with "-format %x" not returning Units

Post by Taldos »

Using the version specified above (v. 6.8.6-Q16) when I run the following from the command line:

Code: Select all

[ImageMagickPath]\Identify -format "%x, %y" "[Filepath]"
The resolution is returned but the units are not. in the case above for example I get

Code: Select all

300, 300
Based on the documentation I expected to see the Units following these numbers. as in "300 PixelsPerInch, 300 PixelsPerInch". this worked on previous version of Imagmagick so I know it was working in the past. I recently upgraded to this version of Imagmagick and I'm wondering if anyone else is seeing this. or if something has changed that hasn't been reflected in the documentation

Incidentally, if I use the "-verbose" option on the file I do see the units specified so I know ImageMagick has access to the data. however in this particular version the units aren't being returned when accessing the data via the format option.

Any help would be greatly apreciated, I'm trying to close this out so we can move the new version of ImageMagick to production to address other defects.

Thanks.
Taldos
Posts: 4
Joined: 2013-09-23T05:13:21-07:00
Authentication code: 6789

Re: 6.8.6-Q16 Identify with "-format %x" not returning Units

Post by Taldos »

Additional information regarding environment. Reproduced issue on

Windows Server 2003 R2. DataCenter x64 Edition. Service Pack 2
Windows 7. Service Pack 1

The binary installer used:
ImageMagick-6.8.6-10-Q16-x64-static.exe
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: 6.8.6-Q16 Identify with "-format %x" not returning Units

Post by fmw42 »

That seems to be the way it is coded as described by http://www.imagemagick.org/script/escape.php. You will need to use identify -verbose yourimage and parse out the units until such time as/if that is changed.
Taldos
Posts: 4
Joined: 2013-09-23T05:13:21-07:00
Authentication code: 6789

Re: 6.8.6-Q16 Identify with "-format %x" not returning Units

Post by Taldos »

we've put the same process you recommended as a stop gap to get things going but was hoping there was a more elegant solution.

Appreciate the feedback

thanks.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: 6.8.6-Q16 Identify with "-format %x" not returning Units

Post by fmw42 »

post the suggestions for a %{units]" on the Developers forum.
olafkarsten
Posts: 29
Joined: 2013-06-13T08:35:38-07:00
Authentication code: 6789

Re: 6.8.6-Q16 Identify with "-format %x" not returning Units

Post by olafkarsten »

I would consider that a Bug. That has definitly changed in the newer Versions. In 6.8.5-10 and earlier on Debian Linux it returns the Units too. Not sure when the change was introduced, but 6.8.10 on linux doesn't work. It breaks our application. I didn't find any record in the change log. :( We work with large files and identify -verbose is not an option. Its way to expensive to get this info. So we stay with the older version and hope we get the old behavior or a working %[units] solution.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: 6.8.6-Q16 Identify with "-format %x" not returning Units

Post by magick »

We added support for %U, the image resolution units in ImageMagick 6.8.7-4 beta available by sometime tomorrow.
Post Reply