Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

perlmagick : Image processing

by Anonymous Monk
on Apr 06, 2004 at 07:47 UTC ( [id://342855]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hai monks


How to extract Bit count of an image using perlmagick module


Thanks in advance


Rudhra

Replies are listed 'Best First'.
Re: perlmagick : Image processing
by matija (Priest) on Apr 06, 2004 at 10:52 UTC
    Bit count? I'm not quite sure what you mean. If you mean the file size, the -s operator returns the size of the file.

    If you want to know the number of pixels, you could use Image::Size, then multiply the x and y dimension.

    I couldn't find a module called "perlmagick", but I did find Image::Magick which is the Perl interface to Imagemagick, and which can return various kinds of information about the image if you use the Get method.

Re: perlmagick : Image processing
by nmcfarl (Pilgrim) on Apr 06, 2004 at 15:45 UTC
    The # bits per pixel, or image depth can be gotten by:
    my ($depth)=$image->Get('depth');
      Oops, forgot to mention that this report color depth per RGB component, per pixel. So a depth of 8, times the 3 RGB components is a "24 bit image"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://342855]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-20 12:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found