Page 1 of 1

How to obtain print size

Posted: 2011-04-22T03:28:26-07:00
by vi.srikanth
Hi

I am trying to get the "print size" of a given image. But I dont know the method with which I can do this using PerlMagick. Could you please help me out?

By the way if I try the command-line "identify -verbose", I am able to see the "print size" information (last line below):

Code: Select all

  Format: TIFF (Tagged Image File Format)
  Class: DirectClass
  Geometry: 945x685+0+0
  Resolution: 300x300
  Print size: 3.15x2.28333
But if I try using PerlMagick I am unable to see any method which can get this "print size" information? Please help.

Thanks
Srikanth

Re: How to obtain print size

Posted: 2011-04-22T05:15:55-07:00
by magick
Print size is computed from the image dimensions divided by the image resolution (e.g. $im->Get('columns') / $im->Get('x-resolution)).

Re: How to obtain print size

Posted: 2011-04-22T06:45:44-07:00
by vi.srikanth
Thanks. It works perfectly.