I've read with some interest the replies to other such questions. I've also had a look throught the "snippets" section but I've yet to find what I'm looking for.

I'm currently writing a Picture Gallery script and would like to be able to limit the size of the "full" image but need to find the image size from both .jpg & .gif files. Can this be done with just plain Perl (and standard Modules)?

Secondly, the Thumbnail pages are currently (and I liked this term so I'll use it myself) "Dumbnail", ie. I have used width and height sizes (50x50), however, this can cause the page to take ages to load on a 56k modem! It would be nice to be able to use ImageMagick or GD, but these aren't available on my server and are unlikely to be available on 95% of my target users servers. Is there any way within Perl to resize and rewrite image files (.jpg & .gif files only)?

Thanks!


In reply to Another Image Resize Question by floyd

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.