• 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
Re: NSImage from Web: Resolution
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImage from Web: Resolution


  • Subject: Re: NSImage from Web: Resolution
  • From: Matt Judy <email@hidden>
  • Date: Sun, 16 Dec 2001 02:09:32 -0800

Solved my own problem.

Instead of setting up an NSImage with initWithData, I set up an NSBitmapImageRep with initWithData, and then setup the NSImage using that imageRep.

NSBitmapImageRep *bitmapImageRep = [[NSBitmapImageRep alloc] initWithData:[someNSURL resourceDataUsingCache:YES]];

NSImage *theImage = [[NSImage alloc] initWithSize:[comicImageBitmapRep size]];

[comicImage addRepresentation:comicImageBitmapRep];
[comicImage setScalesWhenResized:YES];
[comicImage setSize:NSMakeSize([comicImageBitmapRep pixelsWide],

[comicImageBitmapRep pixelsHigh])];


References: 
 >NSImage from Web: Resolution (From: Matt Judy <email@hidden>)

  • Prev by Date: Problem with NSFontManager's traitsOfFont
  • Next by Date: Re: Cocoa Documentation on NSFormatter
  • Previous by thread: NSImage from Web: Resolution
  • Next by thread: Re: NSImage from Web: Resolution
  • Index(es):
    • Date
    • Thread