NSGraphicsContext size limit?
NSGraphicsContext size limit?
- Subject: NSGraphicsContext size limit?
- From: "M. Carlson" <email@hidden>
- Date: Tue, 28 Mar 2006 18:18:51 +0000
Is there a limit to the size an NSGraphicsContext can have?
I'm trying to use a large image, 24000 x 12000 (1GB), but NSGraphicsContext
blows up. It works fine for smaller images.
NSRect nsrect; // x=0.0, y=0.0, width= 24000.0, height= 12000.0
(verified in gdb)
. . .
NSBitmapImageRep *bitmapRep = [NSBitmapImageRep alloc];
[bitmapRep initWithBitmapDataPlanes:NULL
pixelsWide:nsrect.size.width
pixelsHigh:nsrect.size.height
bitsPerSample:8
samplesPerPixel:4
hasAlpha:YES
isPlanar:NO
colorSpaceName:NSDeviceRGBColorSpace
bytesPerRow:nsrect.size.width * 4
bitsPerPixel:32];
-> NSGraphicsContext *context = [[NSGraphicsContext
graphicsContextWithBitmapImageRep:bitmapRep];
The last line blows up with:
Exception: EXC_BREAKPOINT (0x0006)
Code[0]: 0x00000001
Code[1]: 0x909c8cc0
Thread 0 Crashed:
0 libobjc.A.dylib 0x909c8cc0 _objc_trap + 0
1 libobjc.A.dylib 0x909c8c34 _objc_error + 76
2 libobjc.A.dylib 0x909c8bc4 __objc_error + 64
3 com.apple.AppKit 0x939e85a8 +[NSGraphicsContext
graphicsContextWithBitmapImageRep:] + 40
Any ideas why this is happening, only for large images?
-Matt
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden