[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #34467] -[NSView bitmapImageRepForCachingDisplayInRect:] broken
From: |
julian |
Subject: |
[bug #34467] -[NSView bitmapImageRepForCachingDisplayInRect:] broken |
Date: |
Mon, 03 Oct 2011 20:38:05 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50 |
Follow-up Comment #3, bug #34467 (project gnustep):
is the underlying bug also responsible for the fact that the following method
(works on OS X) to get the pixel data of a NSImage doesn't work - or should i
file a separate bug?
NSImage *theImg = [[NSImage alloc] initWithContentsOfURL:_url];
NSBitmapImageRep* bitmap = [NSBitmapImageRep alloc];
NSSize imgSize = [theImg size];
[theImg lockFocus];
[bitmap initWithFocusedViewRect:NSMakeRect(0.0, 0.0, imgSize.width,
imgSize.height)];
[theImg unlockFocus];
char *_data = (char *)calloc( imgSize.width * 4 * imgSize.height, 1);
memcpy(_data, [bitmap bitmapData], imgSize.width * 4 * imgSize.height);
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?34467>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.gnu.org/