In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Relationship Graph View Issue ] Dependency Graph ]
related to child of duplicate of

Viewing Issue Simple Details
ID Category Type Reproducibility Date Submitted Last Update
0000458 [In-Portal CMS] Data Management bug report always 2009-12-18 11:50 2010-05-11 03:00
Reporter alex View Status public  
Assigned To alex
Priority normal Resolution fixed  
Status closed      
Summary 0000458: Scale image quality setting is incorrect for PNG images
Description In ImageHelper we have method called ScaleImage. In the end of process
it does, it saves image with functions such as imagejpeg, imagepng,
imagegif, etc. These functions take quality parameter, and we pass
hardcoded quality value = 100. But imagepng function may have only 0-9
value range, and if quality is not in this range, it saves broken
image file. So resize/watermarking never worked for png images.

Note: png quality parameter values are reversed related to jpeg: 0
means no compression, and 9 means highest possible compression.

I think we need to investigate about other image saving functions,
what quality values they take.

Also, as improvement, we may add configuration value for resized image
quality, so site administrator will be able to control size-quality
balance.
Additional Information We use 100 as image quality for resized images. This is not always true, see
image function description above:

   - imagejpeg - 100;
   - imagegif - doesn't have quality parameter at all;
   - imagepng - 9.

That's why all resized PNG images are broken in result (just black). Maybe
value of 100 at least worked some how before PHP 5.2 or maybe we were not
using PNG images a lot in our projects.



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker