Re: per pixel reading from a tiff
Re: per pixel reading from a tiff
- Subject: Re: per pixel reading from a tiff
- From: David Remahl <email@hidden>
- Date: Fri, 20 Sep 2002 23:06:20 +0200
I don't know what method Martin is using to get the color values. Probably
he is accessing the bitmap image rep directly. If you are only interrested
in finding the value of a single pixel or a small group, then the following
solution may be easier:
NSColor *theColor;
NSImage *theImage = [[NSImage alloc] initWithContentsOfFile:tiffImagePath];
[theImage lockFocus];
theColor = NSReadPixel(NSMakePoint(x, y));
[theImage unlockFocus];
[theImage release];
/ Sincerely, David Remahl
>
I think that Martin Wennerberg has some source available online that
>
would allow you to do this:
>
>
http://www.orcsoftware.com/~martin
>
>
Look in the sources for MorphX or Tint (and try out these beauties
>
while you're at it).
>
>
j o a r
>
>
On Friday, Sep 20, 2002, at 21:46 Europe/Stockholm, David Burris wrote:
>
>
> I've been looking thru the cocoa dev mailing list archive for a
>
> explanation as how to get the RGB value of a single pixel from a tiff
>
> file and the best i could find was this:
>
> http://cocoa.mamasam.com/MACOSXDEV/2002/01/2/22626.php This seems
>
> like a fairly major thing to be simply 'left out' or is there an easy
>
> way to do this that I am missing?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.