Re: NSImage problems
Re: NSImage problems
- Subject: Re: NSImage problems
- From: Dorian Johnson <email@hidden>
- Date: Sat, 9 Jun 2007 12:08:41 -0500
Tiff isn't necessarily plain rgb data, and you can't trust it not to
have a header etc.
Instead of getting the tiff data from the original, lock focus onto
your destImageRep with +[NSGraphicsContext
graphicsContextWithBitmapImageRep] and draw the image into it. Then,
use your same loop, but with the source and destination will be the
same (color->grayscale can be done in-place).
On Jun 9, 2007, at 12:00 PM, Barry wrote:
I'm attempting to learn cocoa programming within Xcode.
I need to write an app which filters images - producing six-color
separations.
I've already done this for windows so have the C code ready, just
need the GUI - Cocoa promises to offer just that !
I downloaded one of Michael Beam 's example from
http://www.oreillynet.com/mac/2002/08/06/examples/ImageApp4.sit
but cannot get it to work. It uses NSImage's to make a grayscale
version of a supplied image.
I have placed a before & after screen grab plus the relevant code at
http://homepage.ntlworld.com/barrypalmer/
I have stepped through with the debugger & cannot see any problem
Any advice would be welcomed
Barry
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden