+2011-06-16 Robin Dunn <robin@alldunn.com>
+
+ Reviewed by Kevin Ollivier.
+
+ [wx] Account for differing byte order when decoding images in the PPC build.
+
+ https://bugs.webkit.org/show_bug.cgi?id=62830
+
+ * platform/image-decoders/wx/ImageDecoderWx.cpp:
+ (WebCore::ImageFrame::asNewNativeImage):
+
2011-06-16 Darin Adler <darin@apple.com>
Reviewed by Dan Bernstein.
WxPixelData::Iterator p(data);
WxPixelData::Iterator rowStart = p;
for (size_t i = 0; i < m_size.width() * m_size.height() * sizeof(PixelData); i += sizeof(PixelData)) {
- p.Red() = bytes[i + 2];
- p.Green() = bytes[i + 1];
- p.Blue() = bytes[i + 0];
- p.Alpha() = bytes[i + 3];
-
+#if CPU(BIG_ENDIAN)
+ p.Alpha() = bytes[i + 3];
+ p.Red() = bytes[i + 2];
+ p.Green() = bytes[i + 1];
+ p.Blue() = bytes[i + 0];
+#else
+ p.Alpha() = bytes[i + 0];
+ p.Red() = bytes[i + 1];
+ p.Green() = bytes[i + 2];
+ p.Blue() = bytes[i + 3];
+#endif
p++;
pixelCounter++;