Jump to content

Cropping images


phpvolution

Recommended Posts

I just lately got back into PHP and am extremely rusty, so bare with me. I need to create a script that will go through a folder of images and crop each one to a certain dimension.

More specifically, these are all scanned images that are all the same dimensions and need to all be cropped the same size. So instead of going through hundreds or thousands of images manually I thought this would save me a bunch of time if I automated it. [img src=\"style_emoticons/[#EMO_DIR#]/wink.gif\" style=\"vertical-align:middle\" emoid=\":wink:\" border=\"0\" alt=\"wink.gif\" /]

I'm not sure where to start as I haven't dealt with cropping yet, and I'm not sure how I can cycle through all the images in a folder. If anyone could provide some direction on how to do this, it would be greatly helpful!

And for the record the image dimensions are:
1276 x 1754 pixels
and need to be cropped to:
915 x 1560 pixels

I'd also like to resize them after cropping but I figure that'd be asking a little much, are there any great tutorials out there on this?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.