I've already looked there, but I need some guidance - such as examples to do my specific task.
Main Topics
Browse All TopicsHi,
We have a complex task to do.
Here are the variables:
$item_code ' Item code for product
$mfr_code ' Manufacturer code
We would like to upload our product images in a form, resize them to the appropriate sizes, and have an image in JPEG and GIF. 1 size & image for JPEG, and the same for GIF - so 2 images per item.
Example:
$item_code.jpg ' 250x250
$item_code.gif ' 100x100
The major task here to resize and convert the images.
Uploading the images as a result of the resizing and converting is easy.
They will be stored as:
prodimages/$mfr_code/$item
prodimages/$mfr_code/$item
Please post any insight.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Using GD to handle GIFs can be a little dodgy, I recommend that you install ImageMagick instead on your server: http://www.imagemagick.org
The syntax is very easy as you can see in the documentation.
Here's a quick and dirty example, hope this helps.
$source = 'IMG_1396.JPG';
$target = 'IMG_1396_Thumbnail.JPG';
$width = 125;
$height = 75;
$quality = 65;
$size = getimagesize($source);
// scale evenly
$ratio = $size[0] / $size[1];
if ($ratio >= 1){
$scale = $width / $size[0];
} else {
$scale = $height / $size[1];
}
// make sure its not smaller to begin with!
if ($width >= $size[0] && $height >= $size[1]){
$scale = 1;
}
$im_in = imagecreatefromjpeg ($source);
$im_out = imagecreatetruecolor($size
imagecopyresampled($im_out
imagejpeg($im_out, $target, $quality);
imagedestroy($im_out);
imagedestroy($im_in);
Business Accounts
Answer for Membership
by: ivanmataPosted on 2003-02-09 at 23:09:16ID: 7915993
take a look at this functions:
en/ref.ima ge.php
http://www.php.net/manual/
cheers =0)