GD wouldn't be useful since it only creates images and doesn't read them.

Not so. GD happily loads existing images in the usual formats:

#! perl -slw use strict; use GD; my $img = GD::Image->new( $ARGV[ 0 ] ); my( $w, $h ) = $img->getBounds; print "The image '$ARGV[ 0 ]' is $w x $h pixels."; printf "The color of the pixel in the middle is: [0x%02x:0x%02x:0x%02x +].\n", $img->rgb( $img->getPixel( $w/2, $h/2 ) ); __DATA__ c:\test>junk5 694790clustered.png The image '694790clustered.png' is 800 x 800 pixels. The color of the pixel in the middle is: [0xfc:0xfe:0xfc]. c:\test>junk5 img\worldx2-2.jpg The image 'img\worldx2-2.jpg' is 5400 x 2700 pixels. The color of the pixel in the middle is: [0x04:0x0c:0x11]. c:\test>junk5 img\gradient.gif The image 'img\gradient.gif' is 108 x 108 pixels. The color of the pixel in the middle is: [0xff:0xff:0xff].

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Re^3: Loading PNG in Perl? by BrowserUk
in thread Loading PNG in Perl? by Xenofur

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.