Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] r1888 - trunk/Image


Chronological Thread 
  • From: arobison@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [Manta] r1888 - trunk/Image
  • Date: Wed, 28 Nov 2007 17:19:15 -0700 (MST)

Author: arobison
Date: Wed Nov 28 17:19:14 2007
New Revision: 1888

Modified:
   trunk/Image/CoreGraphicsFile.cc
Log:
Fixed upside-down images.


Modified: trunk/Image/CoreGraphicsFile.cc
==============================================================================
--- trunk/Image/CoreGraphicsFile.cc     (original)
+++ trunk/Image/CoreGraphicsFile.cc     Wed Nov 28 17:19:14 2007
@@ -69,7 +69,9 @@
                                     32,
                                     bytes_per_row,
                                     color_space,
-                                    kCGImageAlphaNoneSkipLast | 
kCGBitmapFloatComponents | kCGBitmapByteOrder32Host);
+                                    kCGImageAlphaNoneSkipLast |
+                                    kCGBitmapFloatComponents  | 
+                                    kCGBitmapByteOrder32Host);
 
 
     CGColorSpaceRelease(color_space);
@@ -134,6 +136,8 @@
   }
 
   CGRect rect = {{0,0},{width,height}};
+  CGContextTranslateCTM(context,0,height);
+  CGContextScaleCTM(context, 1.0, -1.0);
   CGContextDrawImage(context, rect, cg_image);
 
   CGContextRelease(context);




  • [Manta] r1888 - trunk/Image, arobison, 11/28/2007

Archive powered by MHonArc 2.6.16.

Top of page