Reading an image file
Reading an image file
- Subject: Reading an image file
- From: Kim Foo-Jones <email@hidden>
- Date: Thu, 31 May 2001 01:52:16 +0100
What is the best way to get at the pixel data in an image file?
(I want to convert a grey-scale height-map into 3D vertices...)
In OS9 I used QuickTime to load an image file and draw it into an
off-screen buffer. Then I could get the base address and read the
data as I pleased...
I'm guessing I need to use some combination of NSImage and
NSBitmapImageRep but I can't quite figure out the procedure from
the docs... I'd be grateful if someone could provide an outline
of the steps necessary to do this.
Thanks,
-Kim