Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Automatically resize Images once uploaded


leatherdealer

Recommended Posts

Hey guys and girls,

I hope you're doing well.

I'd like to know where in osc 2.3.3 handles the image uploads from the categories.php

I've found a nice github repo for image resizing. I'm neither a newbie nor a  noob at PHP, but I need to know where the image upload is being handled to be able to properly add the functions for image resizing. 

https://github.com/Nimrod007/PHP_image_resize That's the repo

Any help is greatly appreciated

Link to comment
Share on other sites

If this is a one-time effort for a photo, why not just use free image processing software such as GIMP? It's probably best to crop and resize on your PC (before uploading), where you have immediate feedback, rather than hoping that any server-side resizer did the desired thing. You certainly don't want your server to be constantly resizing images as it feeds them out, nor feeding huge image files to the browser to be scaled down there. You may want to have several sizes on hand, such as a full size display, a thumbnail, and possibly something in-between. Use a "crop" function in the image processor to trim the photo to the desired aspect ratio, rather than simply stretching or squeezing in one dimension to get the desired shape.

Link to comment
Share on other sites

5 hours ago, leatherdealer said:

Hi, I'm my own host. I have multiple dedis. What's the correct name of the "covert" thing ? 

@leatherdealer, "convert" is the program and it is part of ImageMagick.

https://www.imagemagick.org/script/install-source.php

I probably wouldn't install from source, unless you really want to have the C and etc compiler installed. You should be able to find the binary for your distro. For Centos, I think it is, yum install ImagicMagick, or you can just do a yum search.

There could be modules that you can just use to get what you need, but as far as cropping is concerned, you probably have to do it manually as I have done countless number of photos after a fashion photo shoot...yep, do it manually.

I use convert basically to scale the pixel size down, and as well as preprocessing and creating the different image sizes that I need. Also, during the processing, I also rename the output image file based on the product description, it did help with image SEO...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...