[Webkit-unassigned] [Bug 27933] SVG Filter premultiplied color support for getImageDate/putImageData
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Aug 6 18:11:10 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=27933
Eric Seidel <eric at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #34037|review? |review-
Flag| |
--- Comment #2 from Eric Seidel <eric at webkit.org> 2009-08-06 18:11:09 PDT ---
(From update of attachment 34037)
+== Rolled over to ChangeLog-2009-06-16 ==SVG Filter premultiplied color
support for getImageDate/putImageData
??
is "NotPreMultiplied" the normal terminolgy? "unmultiplied"? Google seems to
suggest that "straight" is the opposite of PreMultiplied I'm not sure that
would be more clear here though. Unmultiplied might be clearer than
NotPreMultiplied. I'm not a graphics expert though.
No argument names:
PassRefPtr<ImageData> getNotPreMultipliedImageData(const IntRect&
rect) const;
73 PassRefPtr<ImageData> getPreMultipliedImageData(const IntRect&
rect) const;
they don't add anything.
Likewise here: ImageData* source
Seems we should add a "colorFrom..." for whatever type of pixel this is:
destRows[basex] = (*pixel & 0x00FF0000) >> 16;
171 destRows[basex + 1] = (*pixel & 0x0000FF00) >> 8;
172 destRows[basex + 2] = (*pixel & 0x0000FF00);
173 destRows[basex + 3] = (*pixel & 0xFF000000) >> 24;
Then we just create the Color in an if and the pixel assignment is shared.
Same here:
*pixel = srcRows[basex + 3] << 24 | srcRows[basex] << 16 | srcRows[basex + 1]
<< 8 | srcRows[basex + 2];
Better to use inlines to share more code. They also are are more
self-documenting.
Seems the toImage() result could be in a local:
if (multiplied == NotPreMultiplied)
134 image =
data.m_pixmap.toImage().convertToFormat(QImage::Format_ARGB32);
135 else
136 image =
data.m_pixmap.toImage().convertToFormat(QImage::Format_ARGB32_Premultiplied)
How do we test this?
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list