Closed
Bug 452676
Opened 16 years ago
Closed 16 years ago
PNG Pseudo-CMS chunks (gAMA and cHRM) aren't handled properly with color management on
Categories
(Core :: Graphics: Color Management, defect)
Core
Graphics: Color Management
Tracking
()
RESOLVED
FIXED
People
(Reporter: bholley, Assigned: bholley)
References
Details
Attachments
(1 file)
(deleted),
patch
|
vlad
:
review+
joe
:
review+
|
Details | Diff | Splinter Review |
This is causing some reftest failures. I've got a patch.
Assignee | ||
Comment 1•16 years ago
|
||
added a patch. Flagging vlad for review.
Attachment #335954 -
Flags: review?(vladimir)
Attachment #335954 -
Flags: review?(vladimir)
Attachment #335954 -
Flags: review?(joe)
Attachment #335954 -
Flags: review+
Comment on attachment 335954 [details] [diff] [review]
patch to fix up profile handling in libpr0n
Looks good, but should get joe to look at it as well.
Updated•16 years ago
|
Attachment #335954 -
Flags: review?(joe) → review+
Comment 3•16 years ago
|
||
Comment on attachment 335954 [details] [diff] [review]
patch to fix up profile handling in libpr0n
Looks good, but I'm wondering how it fixes anything -- it looks like you're simply removing #ifdefs?
>- FloatVals->n[VX] = ToFloatDomain(In[0]);
>- FloatVals->n[VY] = ToFloatDomain(In[1]);
>- FloatVals->n[VZ] = ToFloatDomain(In[2]);
>+ FloatVals->n[VX] = ToFloatDomain(RGB_8_TO_16(In[0]));
>+ FloatVals->n[VY] = ToFloatDomain(RGB_8_TO_16(In[1]));
>+ FloatVals->n[VZ] = ToFloatDomain(RGB_8_TO_16(In[2]));
Unless this fixes it! What's the reason behind this?
Assignee | ||
Comment 4•16 years ago
|
||
joe - patch definitely does more than removing #ifdefs (that was just a side thing that bothered me). libpng gamma correction now also happens in the case of embedded profiles when there isn't a cHRM chunk (meaning we can't make a full ICC profile out of non-ICC chunks).
The RGB_8_TO_16 was a bug in a rarely-used codepath in LCMS that came to light after I fixed the main issue. Bundling it in to avoid creating a separate bug for it.
Assignee | ||
Comment 5•16 years ago
|
||
pushed in be67522b90ad
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment 6•16 years ago
|
||
Removing those #ifndefs means that the system libpng is required to support the various color chunks. If you try to load with a system libpng that was built without them you'll get unsatisfied references. In a stock system libpng, those PNG_NO_READ_iCCP and PNG_NO_READ_sRGB things won't be defined. I think it would be safer to leave them in.
Assignee | ||
Comment 7•16 years ago
|
||
Glenn -- I had assumed that the calls to png_get_valid(png_ptr, info_ptr, PNG_INFO_sRGB) and the like would fail if their respective #ifdefs had the feature disabled? Is this not the case? Also, if PNG_NO_READ_fOO is defined, does that mean that PNG_INFO_fOO is not defined as well (leading to compilation errors)? If so, you're right and we should file a bug for adding those #ifdefs back in.
Comment 8•16 years ago
|
||
The function won't get called but I think the loader will fuss about the unsatisfied reference anyhow.
Comment 9•16 years ago
|
||
The PNG_INFO_fOOO masks are always defined regardless of the presence of feature fOOO.
Assignee | ||
Comment 10•16 years ago
|
||
Glenn - oh right, good point. Can you open up a new new blocker for bug 455056 for this issue? I'll try to take care of it when I get back from argentina in a week.
Comment 11•16 years ago
|
||
Sure. Have a nice trip!
Updated•16 years ago
|
Product: Core → Core Graveyard
Assignee | ||
Updated•16 years ago
|
Component: GFX → GFX: Color Management
Product: Core Graveyard → Core
QA Contact: general → color-management
You need to log in
before you can comment on or make changes to this bug.
Description
•