Community Add-Ons
| Maintainers: | osc_devel |
Image Upload Resizer
for osCommerce Online Merchant v2.2
This is a small contribution which simply verifies that the width and height of a newly uploaded image is within acceptable boundries.
If not, the image is resized to within the boundries, maintaining the aspect ratio using simple calculations, and resaved over the uploaded file.
This will not expand images which are below the boundries due to pixelation which will occur upon expansion of small images.
- Simple 1 step install.
- Saves space on webserver.
- Ensures that pages which display product images do not have an un-neccessarily long loading time on slower or overtaxed internet connections.
Below resize codes are not performing well on image quality and code was not well written doing such things properly (CAPS extention, detecting image type or so on). Getting image type is not a good option from image filename, better to get get it from binary information. So I decided to rewrite all.
- You can now set x or y value only, or both. If both set constrain value = 1 (or true) so calculation decides either x or y value to be used. Otherwise generated image's x or y size can be shrinked.
- Now you can set JPG quality
