2

So far, I've been uploading one image by hand (FTP to the server when live, locally moving a file), and then resizing them on the fly using the img tag's width and height properties to resize them. Well, the images don't look good, because I need a square, cropped 100px version as a thumbnail, and then a 800px wide version for the view image page, and then finally the full-size original image for HD viewing, but I also need to apply a watermark, but only to the full res version. And I need help with an image upload script. Any sort of file upload, really. I've looked at tutorials, and they don't seem to make too much sense. Furthermore, I need to drop all three versions into a database row (which I think I can figure out). I know that I need to use something like $_FILE to do it, but I'm just really confused to the actual usage and the cropping/resizing/watermarking part really has me stumped. Solutions, anyone?

2 Answers 2

1

File uploading

  • Upload using a simple HTML form and use PHP to manipulate the image. Example
  • Read all the images stored in a directory and convert them in a batch. Example

Image re-sizing

  • Use ImageMagick or GD library to resize images. Example
  • Use any of the same libraries to watermark the images. Example

In all, you need to combine all these in order to upload, resize and watermark all in one go.

0

For the resizing, watermark etc, you should look at ImageMagic

1
  • I'll look into it. What of the uploading, though?
    – user811348
    Jul 12, 2011 at 4:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.