> 
> On 12 Mar '08, at 9:09 AM, Trygve Inda wrote:
> 
>> NSImage *           image = [NSImage imageNamed:@"colorTest"];
>> NSBitmapImageRep *  imageRep = [NSBitmapImageRep imageRepWithData:
>> [image
>> TIFFRepresentation]];

This comes from here:

http://www.cocoadev.com/index.pl?NSBitMapImageRep

The easiest way to get a guaranteed bitmap from an arbitrary NSImage is to
use TIFF as an intermediate representation. It's not fast but it gets the
job done.

NSData *tiff_data = [[NSData alloc] initWithData:[any_image
TIFFRepresentation]];
NSBitmapImageRep *bitmap = [[NSBitmapImageRep alloc]
initWithData:tiff_data];


What I need to do, is read a jpg... And get at the RGB data directly.

And

Create a pixel buffer directly (which I will fill with pixel data), then
make this some sort of image that I can draw over with semi-transparent text
and save the result to a new jpg.

None of this will ever appear on screen (at least in my app).

Trygve


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to