bobbruce Posted August 4, 2004 Posted August 4, 2004 I have uploaded product images about 200 x300 size. This size being the required enlarged size. The images are a mixture of landscape and portrait and so a single thumbnail size setting will not keep all the aspect ratios. I have tried 2 packages from the contribution section but this appears to have no effect. I have tried leaving out or adding a 0 setting for the height or width which just causes the full size image to display instead of a thumbnail. Is there a solution that will work? The Configuration/Images setting just seem to overide anything else.
JeanLuc Posted August 4, 2004 Posted August 4, 2004 Try this: In catalog/includes/functions/html_output.php, find the function tep_image() and just after if (tep_not_null($width) && tep_not_null($height)) { add this: //BOF for homothetic image if ($get_size_image = @getimagesize($src)) { ?$ratio_image_product = $get_size_image[0]/$get_size_image[1]; ?$ratio_image_print = $width/$height; ?if ($ratio_image_product > $ratio_image_print) { ? ?$height = $width / $ratio_image_product; ?} ?elseif ($ratio_image_product < $ratio_image_print) { ? ?$width = $height * $ratio_image_product; ?} } // EOF Now, sets the width AND the height of the images and it will be OK... Regards... JeanLuc OsC: MS2
BoostCreeps Posted August 4, 2004 Posted August 4, 2004 How about this similar problem? I want the sub-catagory images (logos) to size themselves to their present ratio. http://www.oscommerce.com/forums/index.php?sho...=0entry419098
bobbruce Posted August 4, 2004 Author Posted August 4, 2004 I did try your fix but only got a division by 0 error. Thanks anyway
angel_duzt Posted August 4, 2004 Posted August 4, 2004 Hi I tell ya what I did with my images ... Go to Configuration in your oscommerce cataloge admin, then go to the images page ... I set small image height to 100 but didnt set a small image width, so just leave that blank as all images are different widths. Also I used a program called Image Thumbnailer and Converter version 2.26. All that did the trick for me. Hope this helps you out! Kind regards Emma :D
nate_02631 Posted August 4, 2004 Posted August 4, 2004 Check out this mod too: http://www.oscommerce.com/community/contributions,2226 Set small image width/height to desired max dimensions... ** Please do not PM with personal support requests (even if offering "payment"). Thank you.
Miguel863 Posted August 6, 2004 Posted August 6, 2004 Hi I tell ya what I did with my images ... Go to Configuration in your oscommerce cataloge admin, then go to the images page ... I set small image height to 100 but didnt set a small image width, so just leave that blank as all images are different widths. Also I used a program called Image Thumbnailer and Converter version 2.26. All that did the trick for me. Hope this helps you out! Kind regards Emma :D Yeah this worked for me, the products do look more decent. I will try those two other software you suggest. What do you do with them, make all the images the same size? Thanks
bobbruce Posted August 6, 2004 Author Posted August 6, 2004 Thanks for all the offers of help. Could someone tell me if I'm missing something here. I want my full size images to be about 200 x 300. ( I have no problem resizing images etc and have necessary tools to do this) If I upload the product image at this size, the program creates the thumbnail by scaling it down to the size specified in the small image dimensions. If I only set one dimension, it just displays it at full size, which is far too big for product listings etc. If I set both dimensions it distorts wider images, if I set none it displays the image full size again. How do I get the thumbnails to display with the correct aspect ratio, and have the image zoom to full size when clicked? If I am being thick, please feel free to tell me. I have tried other contributions, but they seem to have no effect.
skizzer Posted August 7, 2004 Posted August 7, 2004 Bob is having the exact same problem that I am. I've tried all of these suggestions and the contributions, but my small pictures all appear squashed. I have a program to make thumbnails, but after they're made, what do I do with them? How do I get the catalog to show the thumbnails and then the large image when you "click for larger image"? Does anybody know what we're talking about?
skizzer Posted August 8, 2004 Posted August 8, 2004 Well, I fixed my particular problem. I went into PhotoShop and increased the shortest side of each canvas (not the picture itself) to match the pixel length of the longest side. Then I filled in the extra canvas with white. I set the small image width and height to 100 each, uploaded the new pictures, and ... ta daaa! The thumbnails are now proportional. I'm a happy camper. :D
nate_02631 Posted August 8, 2004 Posted August 8, 2004 You couldn't get this contrib to work? http://www.oscommerce.com/community/contributions,2226 :blink: ** Please do not PM with personal support requests (even if offering "payment"). Thank you.
skizzer Posted August 8, 2004 Posted August 8, 2004 I personally couldn't get any of them to work. But then, I'm probably just a moron. ;)
bobbruce Posted August 8, 2004 Author Posted August 8, 2004 Thats exactly what I did - even the 100 x 100 pixel size. I gave up with trying the contributions, absolutely nothing worked for me. :rolleyes:
Recommended Posts
Archived
This topic is now archived and is closed to further replies.