+#else
+ // Render the image into a rep using pixels instead of points.
+ NSBitmapImageRep *bit_rep = [[NSBitmapImageRep alloc]
+ initWithBitmapDataPlanes:NULL
+ pixelsWide:[img size].width
+ pixelsHigh:[img size].height
+ bitsPerSample:8
+ samplesPerPixel:4
+ hasAlpha:YES
+ isPlanar:NO
+ colorSpaceName:NSCalibratedRGBColorSpace
+ bytesPerRow:0
+ bitsPerPixel:0];
+ bit_rep.size = [img size];
+ [NSGraphicsContext saveGraphicsState];
+ [NSGraphicsContext setCurrentContext:
+ [NSGraphicsContext
+ graphicsContextWithBitmapImageRep:bit_rep]];
+ [img drawInRect:NSMakeRect(0, 0, [img size].width, [img size].height)
+ fromRect:NSZeroRect operation:NSCompositeCopy fraction:1.0];
+ [NSGraphicsContext restoreGraphicsState];
+#endif