Anonymous | Login | Signup for a new account | 2023-11-29 01:50 CST | ![]() |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Viewing Issue Advanced Details [ Jump to Notes ] [ Wiki ] [ Related Changesets ] | [ View Simple ] [ 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 | Platform | |||
Status | closed | OS | |||||
OS Version | |||||||
ETA | none | Fixed in Version | 5.0.3-B1 | Product Version | 5.0.1 | ||
Target Version | 5.0.3 | Product Build | |||||
Time Estimate | No 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. |
||||||
Steps To Reproduce | |||||||
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 |
![]() ![]() |
||||||
|
![]() |
|
![]() |
|
![]() Dmitry (manager) 2010-02-21 17:57 |
Review and Tested Okay. |
![]() 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 |
![]() 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. |
![]() alex (manager) 2010-05-11 03:00 |
Closing all tasks from released versions. |
![]() |
|||
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 ] | ||
![]() |
|||
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 |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Web Development by Intechnic![]() In-Portal Open Source CMS |