• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Convert JPEG to NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Convert JPEG to NSImage
      • From: Philip Dow <email@hidden>
  • Prev by Date: Obj-C compiler warnings
  • Next by Date: Re: Vu-meter
  • Previous by thread: Re: Obj-C compiler warnings
  • Next by thread: Re: Convert JPEG to NSImage
  • Index(es):
    • Date
    • Thread