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!

Viewing Issue Simple Details Jump to Notes ] Wiki ]  Related Changesets ] View Advanced ] Issue History ] Print ]
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 Project Name In-Portal CMS
Assigned To alex Developer
Priority normal Resolution fixed Fixed in Version 5.0.3-B1
Status closed Product Version 5.0.1 Target Version 5.0.3
Time EstimateNo estimate
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.
Tags No tags attached.
Reference http://groups.google.com/group/in-portal-bugs/browse_thread/thread/bf6e35355c3d5691?hl=en
Change Log Message
Estimate Points 0
Attached Files patch file icon png_image_resize_fix.patch [^] (738 bytes) 2009-12-19 04:40 [Show Content]
patch file icon wrong_compression_setting_for_imagepng.patch [^] (512 bytes) 2010-03-14 06:22 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
User avatar (0001481)
Dmitry (manager)
2010-02-21 17:57

Review and Tested Okay.
User avatar (0001556)
alex (manager)
2010-03-11 09:01

Fix committed to 5.0.x branch. Commit Message:

Fixes 0000458: Scale image quality setting is incorrect for PNG images
User avatar (0001593)
alex (manager)
2010-03-14 06:27

About "wrong_compression_setting_for_imagepng.patch" patch:

Function "imagepng" has "compression" as 2nd parameter, but "imagejpg" has "quality" as 2nd parameter. That lead to imagepng being given worst quality setting in result.
User avatar (0002155)
alex (manager)
2010-05-11 03:00

Closing all tasks from released versions.

- Related Changesets
In-Portal CMS: 5.0.x r13213
Timestamp: 2010-03-14 06:26:55
Author: alex
Details ] Diff ]
1. Bug 0000458: Scale image quality setting is incorrect for PNG images
2. Function "imagepng" has "compression" as 2nd parameter, but "imagejpg" has "quality" as 2nd parameter. That lead to imagepng being given worst quality setting in result.
mod - /in-portal/branches/5.0.x/core/units/helpers/image_helper.php Diff ] File ]
In-Portal CMS: 5.0.x r13201
Timestamp: 2010-03-11 09:01:42
Author: alex
Details ] Diff ]
Fixes 0000458: Scale image quality setting is incorrect for PNG images
mod - /in-portal/branches/5.0.x/core/units/helpers/image_helper.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2010-05-11 03:00 alex Note Added: 0002155
2010-05-11 03:00 alex Status resolved => closed
2010-03-14 06:27 alex Note Added: 0001593
2010-03-14 06:26 alex Changeset attached 5.0.x r13213
2010-03-14 06:22 alex File Added: wrong_compression_setting_for_imagepng.patch
2010-03-11 09:01 alex Note Added: 0001556
2010-03-11 09:01 alex Status reviewed and tested => resolved
2010-03-11 09:01 alex Fixed in Version => 5.0.3-B1
2010-03-11 09:01 alex Resolution open => fixed
2010-03-11 09:01 alex Changeset attached 5.0.x r13201
2010-02-26 16:52 Dmitry Developer => alex
2010-02-21 17:57 Dmitry Note Added: 0001481
2010-02-21 17:57 Dmitry Assigned To !COMMUNITY => alex
2010-02-21 17:57 Dmitry Status needs testing => reviewed and tested
2010-01-06 06:22 alex Target Version Icebox => 5.0.3
2009-12-19 04:40 alex Assigned To => !COMMUNITY
2009-12-19 04:40 alex Status active => needs testing
2009-12-19 04:40 alex File Added: png_image_resize_fix.patch
2009-12-18 11:51 alex Target Version => Icebox
2009-12-18 11:50 alex New Issue
2009-12-18 11:50 alex Reference => http://groups.google.com/group/in-portal-bugs/browse_thread/thread/bf6e35355c3d5691?hl=en



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

Powered by Mantis Bugtracker