Convert JPEG to NSImage
Convert JPEG to NSImage
- Subject: Convert JPEG to NSImage
- From: Ian was here <email@hidden>
- Date: Mon, 1 Aug 2005 13:23:09 -0700 (PDT)
Does anyone have any sample code for converting JPEG
data into TIFF data that can be used for an NSImage.
I've googled and experimented and have not found a
solution to this problem.
NSBitmapImageRep *bmRep = [NSBitmapImageRep
imageRepWithData:imageData];
NSImage *thumbnailImage = [[NSImage alloc]
initWithSize:NSMakeSize( (float)[bmRep pixelsWide],
(float)[bmRep pixelsHigh] )];
[thumbnailImage lockFocus];
[bmRep drawInRect:NSMakeRect( 0.0, 0.0,
[thumbnailImage size].width, [thumbnailImage
size].height )];
[thumbnailImage unlockFocus];
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden