[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.18-1-697-g2f78b87
pkasting at chromium.org
pkasting at chromium.org
Wed Jan 20 22:25:09 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 8c561604eb5644543f2edbad2df989cc8cccee25
Author: pkasting at chromium.org <pkasting at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 15 01:30:04 2010 +0000
Decoding images to scaled output buffers resulted in garbage for
no-alpha PNGs and CMYK JPEGs.
https://bugs.webkit.org/show_bug.cgi?id=33624
Reviewed by Adam Barth.
No layout test since I don't have access to a platform that scales the
output buffers.
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::convertCMYKToRGBA):
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageDecoder::rowAvailable):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53305 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b668ac7..e249c3c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-01-14 Peter Kasting <pkasting at google.com>
+
+ Reviewed by Adam Barth.
+
+ Decoding images to scaled output buffers resulted in garbage for
+ no-alpha PNGs and CMYK JPEGs.
+ https://bugs.webkit.org/show_bug.cgi?id=33624
+
+ No layout test since I don't have access to a platform that scales the
+ output buffers.
+
+ * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
+ (WebCore::convertCMYKToRGBA):
+ * platform/image-decoders/png/PNGImageDecoder.cpp:
+ (WebCore::PNGImageDecoder::rowAvailable):
+
2010-01-14 Brian Weinstein <bweinstein at apple.com>
Rubber-stamped by Oliver Hunt.
diff --git a/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp b/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
index 9691c38..5d47835 100644
--- a/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
+++ b/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
@@ -470,7 +470,7 @@ static void convertCMYKToRGBA(RGBA32Buffer& dest, int destY, JSAMPROW src, JDIME
if (scaled) {
int numColumns = scaledColumns.size();
for (int x = 0; x < numColumns; ++x) {
- JSAMPLE* jsample = src + scaledColumns[x] * 3;
+ JSAMPLE* jsample = src + scaledColumns[x] * 4;
unsigned c = jsample[0];
unsigned m = jsample[1];
unsigned y = jsample[2];
diff --git a/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp b/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
index d2705f9..7d9cdd0 100644
--- a/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
+++ b/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
@@ -404,8 +404,8 @@ void PNGImageDecoder::rowAvailable(unsigned char* rowBuffer, unsigned rowIndex,
int columns = m_scaledColumns.size();
bool sawAlpha = buffer.hasAlpha();
for (int x = 0; x < columns; ++x) {
- png_bytep pixel = row + m_scaledColumns[x] * 4;
- unsigned alpha = pixel[3];
+ png_bytep pixel = row + m_scaledColumns[x] * colorChannels;
+ unsigned alpha = (hasAlpha ? pixel[3] : 255);
buffer.setRGBA(x, destY, pixel[0], pixel[1], pixel[2], alpha);
if (!sawAlpha && alpha < 255) {
sawAlpha = true;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list