Hmm... I need to find out myself. I don't know what is the right answer to your question. I'll do some poking around and get back to you if I find an answer. You should email the people at iPage as they probably could give you help..
Check out the JPG Thumbnailer contribution in contributions. You can specify a size it will resize the image on the fly on the server. However, I would highly recommend not using images of that size on your site. Even resizing them down to 640x480 will make your iPage site extremely slow. If you have to use something that big, I would say get a good web image editor and slice the image up into smaller parts...
I tried this contrib and can't get it to work at all..
I made a bunch of odd size clear boxes and made everything about the sight outta wack...
There is more than one try another - also you need to have GD on the server check with your host...
Thanks for all of your help on this matter!.
I found that the contrubutions about at the moment require you to upload 3 images or they make 3 images from the image that you upload, what would be ideal is to have a script that resizes the image when you upload, to make the uploading images "foolproof" as it were..
I have GD Installed on my server as I run my sites on my persional server at home, Its cheeper and has less restrictions ;-).
I also have installed the "Crimages" contrubition, this watermarks your popup image on the fly (Recomended) So this makes it very hard to install any of the contrubutions that mod the catalog side of things..
Does anyone use this sort of resizing???.
We use a resizer which resizes when we upload the images. it creates a thumbnail and keeps the original image. therefore the thumbnail gets shown and it is resized economically and is not merely squashed to fit. when the user clicks the enlarge image it shows the original. I will post the code for you tomorrow as I have to go right now so dont have time to dig it out. sorry...
Thankyou for your help Gareth.
Did you have any luck funding up your code?.
Does it resize the origional image if it is too big?.
Word of warning all, the forums are having problems sending emails of replys, so you will need to check withing your controll panel :-(.
Kind Regards All.
Lol sorry I totally forgot!!.
Useless I know.
Here is the function we use.
Not sure how you would go about implementing it into the oscommerce admin because we create our own 'oscommerce' admin which is where the products etc get uploaded for us. This helps us make modifications more easily and cuts out access to alot of the stuff which we don't want clients messing with..
The way it works is -.
Upload image before calling function..
Then call function.
This creates thumbnail.
Then thats it really.
Just modify pages where thumbnail is showed to enable them to show the thumbnail instead of the big image shrunken down. the name of the thumbnail is the same as the big image but with '_thumb' on the end. you change the display code (to display the thumbnail) by exploding it to split the file ending and the name-then add _thumb onto the end of the name (name in database). hope you understand.
But I hope it is useful to you..
$original = Full path to the source image.
$target = Full path to target image file (not just thumb extension-must be full name).
$width = Target maximum width.
$height = Target maximum height.
$type = Target file type. 1->GIF, 2->JPEG, 3->PNG.
$proportioned = If true then original proportions retained,.
(hence 'max' width and height). If.
false then resize to absolute width.
$quality = Target image quality, only used for JPEG..
Function ResizeImage($original, $target, $width, $height, $type, $proportioned=true, $quality=30).
$img_dims = getimagesize($original);.
If($img_dims>=1 && $img_dims<=3 && ($type==2 || $type==3)).
0, 0, //dest coord.
0, 0, //source coord.
$width, $height, //dest sizes.
$img_dims, $img_dims // src sizes.
if($ImageWrite($img_tmp, $target, $quality)).
//failed to resample image.
//failed to copy image.
//failed to create temporary file.
//unsupported file type.
It looks complicated to install, so I think I will have to leave it untill I get back from holiday in 2 weeks..
Speak to you all soon.
Many thanks for posting that code, I had no idea actually that there _were_ any PHP functions to work with images (dumb, aren't I !!! )..
Looking through php.net after seeing the functions you used, and I came across an online overview of image functions, wow, incredible stuff. Here's the post from php.net.
If I upload an image that is 1280 x 960 (1.3 Mp) OSCommerce will resize the picture smaller for the thumbnails, But is there a way to make OSCommerce resize the image "on the fly" to 640 x 480 if someone clicks on the "click to enlarge" link???.
I have seen some contributions that will allow you to upload 3 diffrent sized images, but this is obversally hard work when there might be a script that will do it automatically for you..
Have a look at my post in this topic:.
It is more related to a popup without an image (just html text), but I _think_ if the popup window dimensions reflected the 640 x 480 size, it _might_ just work ??.