On Oct 1, 2009, at 11:19 AM, Ken Ferry wrote:
Hi David,
Oh, yes, you're right. In the bitmapData, the first row is the top
row.
-getPixelAtX:y:, -setPixelAtX:y:, -getColorAtX:y: and setColorAtX:y:
are
the same. The first row is the top. Sorry that's confusing.
It might be nice if this
Hi David,
Oh, yes, you're right. In the bitmapData, the first row is the top row.
-getPixelAtX:y:, -setPixelAtX:y:, -getColorAtX:y: and setColorAtX:y: are
the same. The first row is the top. Sorry that's confusing.
-isFlipped: is not a property of NSBitmapImageRep, that's on NSImage. The
abov
Well, I can work around it but I don't understand this at all.
Apparently the context is flipped, or getPixelAtX:y: is flipped, or
something. In this code, the first NSLog statement gives all zeros,
and the second gives the intended red color. However flipped returns
NO. Any ideas as to
Jonathan, Dave-
Nothing works yet. Dave's NSLog statement prints
"NSCalibratedRGBColorSpace 0 0 0 0", and restoring the graphics
context does not help the problem. Still stumped.
-Dave
This is just as guess, but perhaps there's an issue with the drawing
not being completed and flushed ba
> float r,g,b,a;
> [pixelColor getRed:&r green:&g blue:&b alpha:&a];
-getRed:... accepts CGFloats as arguments, not floats. Depending on
your architecture, you're supplying a pointer to an incorrectly-sized
variable, and the bug you're seeing is the result of this error.
If you NSLo
On Oct 1, 2009, at 1:22 AM, David Hirsch wrote:
> In the code below, the TIFF gets saved correctly (transparent but for the red
> square), but when I query the pixel at (40,40) which should be in the middle
> of the red square, I get a black pixel (r==g==b==a==0.0):
> offscreenRep = [[NSB
In the code below, the TIFF gets saved correctly (transparent but for
the red square), but when I query the pixel at (40,40) which should be
in the middle of the red square, I get a black pixel (r==g==b==a==0.0):
offscreenRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:nil