Bug 9386 - Incorrect gray calculation in SplashOutputDev::setFillColor
Summary: Incorrect gray calculation in SplashOutputDev::setFillColor
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: splash backend (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-18 14:00 UTC by Scott Turner
Modified: 2006-12-19 12:28 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Scott Turner 2006-12-18 14:00:46 UTC
In SplashOutputDev.cc in method void SplashOutputDev::setFillColor(int r, int g, int b) 

  gray = (GfxColorComp)(0.299 * rgb.r + 0.587 * rgb.g + 0.114 * rgb.g + 0.5);

Should be:

  gray = (GfxColorComp)(0.299 * rgb.r + 0.587 * rgb.g + 0.114 * rgb.r + 0.5);

This leads to an incorrectly calculated grey value, which is only really annoying on a grey scale device such 
as an iRex iLiad.
Comment 1 James Cloos 2006-12-19 11:18:03 UTC
:-)

Presumably that should be “0.114 * rgb.b”, eh?
                                       ↑

☺
Comment 2 Scott Turner 2006-12-19 12:09:37 UTC
Huh yeah, that's what I meant! :-)
Comment 3 Albert Astals Cid 2006-12-19 12:28:15 UTC
Fixed, thanks for reporting.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.