Changeset 53305 in webkit
- Timestamp:
- Jan 14, 2010 5:30:04 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r53301 r53305 1 2010-01-14 Peter Kasting <pkasting@google.com> 2 3 Reviewed by Adam Barth. 4 5 Decoding images to scaled output buffers resulted in garbage for 6 no-alpha PNGs and CMYK JPEGs. 7 https://bugs.webkit.org/show_bug.cgi?id=33624 8 9 No layout test since I don't have access to a platform that scales the 10 output buffers. 11 12 * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: 13 (WebCore::convertCMYKToRGBA): 14 * platform/image-decoders/png/PNGImageDecoder.cpp: 15 (WebCore::PNGImageDecoder::rowAvailable): 16 1 17 2010-01-14 Brian Weinstein <bweinstein@apple.com> 2 18 -
trunk/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
r52791 r53305 471 471 int numColumns = scaledColumns.size(); 472 472 for (int x = 0; x < numColumns; ++x) { 473 JSAMPLE* jsample = src + scaledColumns[x] * 3;473 JSAMPLE* jsample = src + scaledColumns[x] * 4; 474 474 unsigned c = jsample[0]; 475 475 unsigned m = jsample[1]; -
trunk/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
r52880 r53305 405 405 bool sawAlpha = buffer.hasAlpha(); 406 406 for (int x = 0; x < columns; ++x) { 407 png_bytep pixel = row + m_scaledColumns[x] * 4;408 unsigned alpha = pixel[3];407 png_bytep pixel = row + m_scaledColumns[x] * colorChannels; 408 unsigned alpha = (hasAlpha ? pixel[3] : 255); 409 409 buffer.setRGBA(x, destY, pixel[0], pixel[1], pixel[2], alpha); 410 410 if (!sawAlpha && alpha < 255) {
Note: See TracChangeset
for help on using the changeset viewer.