(can you tell Perl isn't my normal server side langauge?)

BrowserUK. Yes, I was converting that particular function from another language. However, the function replacement wasn't working for me. Pointing out my error was helpful in locating documentation that was Perl specific.

Zentara. Thank you for this bit of documented code. I am now able to get the cropped images I was looking for.

$image->copy($sourceImage,$dstX,$dstY,$srcX,$srcY,$width,$height);

Thank you guys both for the quick and straight-foward help.

I was getting a cropped image because the image files I'm uploading are really big, and using copyresized causes the server to timeout and send back an internal server message. Well, even though the script seems to be working on files slightly larger than ones that failed with the old script, the server still times out for the REALLY big ones. Is there anyway to resize an image without putting so much strain on the server? For instance, crop the image without actually having to open it?

In reply to Re^2: gdImageCreateFromGd2Part by sfhazel
in thread gdImageCreateFromGd2Part by sfhazel

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.