Skip navigation.
 
mlNSReadPixel crash
FROM : Alexander Cohen
DATE : Fri Nov 02 18:15:59 2007

I'm using NSReadPixel in a mouseMoved event on a view to read the 
color of a pixel where the mouse is and display it to the user. ON 
10.5 all is good. If i use the same images on 10.4, once in a while, 
i'll get a crash. And the log is not very helpfull, it just ends with 
the said function. In any case, here's how i'm getting the color:

[self lockFocus];
NSColor*    c = NSReadPixel(pt) // got point from a [self 
convertPoint ...] using the event from the mouseMoved message
[self unlockFocus]

What could cause NSReadPixel to crash straight out like that?

thanks

AC

Related mailsAuthorDate
No related mails found.