I have a crash report:
It is crashing inside the libPng.dyld png_malloc routine because an attempt by
system malloc to allocate a memory block at 0x1003efe58 fails because heap
corruption was detected. I instrumented allocations and determined that my code
never allocated memory near here. But l
I have code that produces a PNG file from a cropped version of a bitmap that
can be 8-bit grayscale, 16-bit grayscale, 24-bit color, or 32-bit color+alpha.
It basically looks like this:
- (NSData *) getPNGCropped: (NSRect)cropRect
{
unsigned char* planes[5];
int offset =(int)cropRect
It would be a good idea to modify the pixel buffer before calling
initWithBitmapDataPlanes. NSBitmapImageRep makes no guarantee that changes to
the data planes will be picked up by the NSBitmapImageRep after the call to
initWithBitmapDataPlanes. It seems to work with OSX 10.5 and earlier, but Sn
>>
>> Indeed, the initWithBitmapDataPlanes method treats the supplied buffer as
>> immutable and creates its own internal copy.
>
> This is not correct. From the docs [1]:
>
> "If planes is not NULL and the array contains at least one data pointer, the
> returned object will only reference th
On Nov 29, 2009, at 9:09 PM, Graham Cox wrote:
>
> On 30/11/2009, at 2:44 PM, Glenn McCord wrote:
>
>> What I'm expecting is the drawAtPoint method to draw nsString inside
>> the bitmapRep of the NSContext at which point I can retrieve the raw
>> data and do something with it. On account of th
Try using curl (the command-line utility) to see _exactly_ what Cocoa
gets from the server when it accesses that URL. The server could be
doing something that confuses Cocoa but which PHP and Safari handle
properly.
-- john
On Oct 22, 2009, at 8:52 AM, Jens Alfke wrote:
On Oct 22, 2009,
Does Leopard provide a means for controlling whether an application
launches in 32-bit or 64-bit? Snow Leopard has the new NSWorkspace
method launchApplicationAtURL:options:configuration:error:
But I can't find an equivalent method that works for OS X 10.5. How
did XCode do it?
--
won't translate to the Cocoa
Drawing Guide for a bit yet. Sadly.
On Sep 25, 2009, at 7:22 PM, John Horigan wrote:
I have a drawing program that creates an NSBitmapImageRep and an
NSImage:
mImage = [[NSImage alloc] initWithSize: size];
mBitmap = [[NSBitmapImageRep
It is a digital art program where the user writes a description of an
image and the program creates it. Image creation can be a lengthy
process so I have the rendering thread periodically send a snapshot of
what it has done so far to the view. This is purely to entertain the
user while they
I have a drawing program that creates an NSBitmapImageRep and an
NSImage:
mImage = [[NSImage alloc] initWithSize: size];
mBitmap = [[NSBitmapImageRep alloc]
initWithBitmapDataPlanes: NULL
pixelsWide: (int)size.width
p
If you send the unwanted events to ScreenSaverView parent of your view
then it should terminate gracefully.
[super theEvent];
-- john
On Sep 24, 2009, at 1:14 AM, Gabriel Zachmann wrote:
Post a mouse down event and the sceensaver engine will remove it
for you.
That is a good idea -- exc
11 matches
Mail list logo