• 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 very strange
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImage very strange


  • Subject: Re: NSImage very strange
  • From: Jeff LaMarche <email@hidden>
  • Date: Wed, 22 Dec 2004 10:57:04 -0500

* a very low resolution version of the image is being used so that it is interpolated up for display.
* the tiles are being drawn the right way up, but are being taken from the wrong (y inverted) part of the image.

Ben:

I'm not sure I know exactly what's going on, but I've got an idea why you might be getting the low resolution version. NSImage will load multiple representations of an image from a file. It seems likely that the JPEG images you are opening have a preview or thumbnail image somehow embedded in the file, either in the resource fork (Photoshop and some other Mac programs still do this), or possibly in the data fork (disclaimer - this is a guess - I don't know that any version of JPEG allows this).

Perhaps you might want to load from a file directly into NSBitmapImageRep (you should end up with NSBitmapImageReps instead of cached image reps) and it will be easier to tell if you retrieved multiple representations.

Sorry to say, I don't have an answer as to why the tiles are being drawn from the wrong part of the image, except to venture a guess that perhaps it is an old-style resource-fork preview that you're getting. Doesn't Quickdraw using an upper left origin?

Dunno - just guesses, but maybe something here will help you find the real problem...


_______________________________________________ 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
References: 
 >NSImage very strange (From: Benjohn <email@hidden>)

  • Prev by Date: NSImage very strange
  • Next by Date: Re: arbitrary date formats based on user prefs
  • Previous by thread: NSImage very strange
  • Next by thread: Re: NSImage very strange
  • Index(es):
    • Date
    • Thread