How to obtain print size

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
vi.srikanth
Posts: 3
Joined: 2011-04-22T00:54:39-07:00
Authentication code: 8675308

How to obtain print size

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How to obtain print size

Post by magick »

Print size is computed from the image dimensions divided by the image resolution (e.g. $im->Get('columns') / $im->Get('x-resolution)).
vi.srikanth
Posts: 3
Joined: 2011-04-22T00:54:39-07:00
Authentication code: 8675308

Re: How to obtain print size

Post by vi.srikanth »

Thanks. It works perfectly.
Post Reply