summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authordynaflash <[email protected]>2008-01-17 14:34:24 +0000
committerdynaflash <[email protected]>2008-01-17 14:34:24 +0000
commit972d270429037d5bd6dd4ce66f79f028af335f1b (patch)
tree59077b410b4c8e9a6b3ca1b91b250552a2278200 /macosx
parentc4d01529b1adc621779693f17475ede75ee48801 (diff)
MacGui: Fix funky preview image colors in the Picture Preview window on PPC, introduced with the NSImage implementation (rev 1189)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1206 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r--macosx/PictureController.mm8
1 files changed, 8 insertions, 0 deletions
diff --git a/macosx/PictureController.mm b/macosx/PictureController.mm
index fc356c7c5..60f163729 100644
--- a/macosx/PictureController.mm
+++ b/macosx/PictureController.mm
@@ -565,7 +565,11 @@ are maintained across different sources */
for (int r = 0; r < dstHeight; r++)
{
for (int c = 0; c < dstWidth; c++)
+#if TARGET_RT_LITTLE_ENDIAN
*dst++ = Endian32_Swap(*src++);
+#else
+ *dst++ = *src++;
+#endif
src += (srcWidth - dstWidth); // skip to next row in src
}
@@ -613,7 +617,11 @@ are maintained across different sources */
UInt32 * src = (UInt32 *)buffer;
UInt32 * dst = (UInt32 *)[imgrep bitmapData];
for (int i = 0; i < numPixels; i++)
+#if TARGET_RT_LITTLE_ENDIAN
*dst++ = Endian32_Swap(*src++);
+#else
+ *dst++ = *src++;
+#endif
NSImage * img = [[[NSImage alloc] initWithSize: NSMakeSize(width, height)] autorelease];
[img addRepresentation:imgrep];