Images compress even if they are the same size as the resize paramenters

(This applies to MX Kollection PRO, Kollection and ADDT as well)

The Kollection > File Upload > Upload and Resize Image server behaviour allows you to specify the image resize dimensions. The script, however, checks to see if the uploaded image is LESS than the specified resize dimensions and, if not, applies the resize and, implicitly, the compression. This needlessly compresses images that are the same size as the resize dimensions specified in the server behaviour and, although it is probably a rarely noticeable bug, it does make images look bad in some cases.

To fix this to the proper behaviour simply open common/lib/image/KT_Image.class.php and around line #242 modify the conditions  to less than OR equal in comparisons

if ( $keepProportion && ($newWidth != 0 && $srcWidth<=$newWidth) && ($newHeight!=0 && $srcHeight<=$newHeight) ) {


exelwebs VPS
Cycle Africa
Exelwebs SSL Certificates

Although we try to ensure all the articles submitted are valid it is your responsibility to make sure you have backups before you use these suggestions on your pc or websites.
We do not take any responsibility for any data-loss, loss in functionality or any problem that might arise in what-ever way or form by making use of the information on this site.

"Friends of Interakt" has no connection to the Adobe Interakt Company