bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #34470] -[NSBitmapImageRep initWithFocusedViewRect:] broken


From: julian
Subject: [bug #34470] -[NSBitmapImageRep initWithFocusedViewRect:] broken
Date: Mon, 03 Oct 2011 23:51:31 +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

URL:
  <http://savannah.gnu.org/bugs/?34470>

                 Summary: -[NSBitmapImageRep initWithFocusedViewRect:] broken
                 Project: GNUstep
            Submitted by: julian_
            Submitted on: Mo 03 Okt 2011 23:51:30 GMT
                Category: Gui/AppKit
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

the following method to obtain the "raw" bytes of a NSImage does work on Cocoa
but not on GNUstep (inline posting may eat two obvious asterisks) - the
resulting data buffer is all zero:

NSImage *theImg = [[NSImage alloc] initWithContentsOfURL:_url]; 

[theImg lockFocus]; 

NSBitmapImageRep *bitmap = [[NSBitmapImageRep alloc]
initWithFocusedViewRect:NSMakeRect(0.0, 0.0, [theImg size].width, [theImg
size].height)]; 

[theImg unlockFocus]; 

char *_data = (char *)calloc( [theImg size].width * 4 * [theImg size].height,
1); 
memcpy(_data, [bitmap bitmapData], [theImg size].width * 4 * [theImg
size].height); 






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?34470>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]