[webkit-reviews] review denied: [Bug 23462] Add RGB -> CMYK conversion algorithm : [Attachment 27105] Patch for RGB -> CMYK converter
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 28 18:13:07 PST 2009
Sam Weinig <sam at webkit.org> has denied Scott Violet <sky at google.com>'s request
for review:
Bug 23462: Add RGB -> CMYK conversion algorithm
https://bugs.webkit.org/show_bug.cgi?id=23462
Attachment 27105: Patch for RGB -> CMYK converter
https://bugs.webkit.org/attachment.cgi?id=27105&action=review
------- Additional Comments from Sam Weinig <sam at webkit.org>
> Index: WebCore/ChangeLog
> ===================================================================
> --- WebCore/ChangeLog (revision 40097)
> +++ WebCore/ChangeLog (working copy)
> @@ -1,3 +1,19 @@
> +2009-01-21 Scott Violet <sky at google.com>
> +
> + Reviewed by nobody (OOPS!)
> +
> + Bug 23462: Add RGB -> CMYK conversion algorithm
> + <https://bugs.webkit.org/show_bug.cgi?id=23462>
> +
> + Adds an RGB -> CMYK converter. This isn't perfect, but better than
> + nothing.
Please remove tabs. Doesn't this actually add a cmyk -> rgb conversion?
>
> +Color CanvasStyle::cmykToRGB() const
> +{
> + ASSERT(m_type == CMYKA);
> + double colors = 1 - m_black;
> + int r = static_cast<int>(nextafter(256, 0) * (colors * (1 - m_cyan)));
> + int g = static_cast<int>(nextafter(256, 0) * (colors * (1 -
m_magenta)));
> + int b = static_cast<int>(nextafter(256, 0) * (colors * (1 - m_yellow)));
> + return Color(r, g, b, static_cast<int>(m_alpha * 255));
> +}
This seems much more suited to be a Color constructor.
r-. Please make the function a color constructor.
More information about the webkit-reviews
mailing list