• 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: determining format of NSImageRep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: determining format of NSImageRep


  • Subject: Re: determining format of NSImageRep
  • From: "Mark J. Lilback" <email@hidden>
  • Date: Tue, 25 Mar 2003 09:16:03 -0500

On Monday, March 24, 2003, at 04:17 PM, Mark J. Lilback wrote:
Well, what you're actually asking for here is to know what the image file *was*, before it was interpreted by one of the imageRep classes' -initWith... routines. An NSBitmapImageRep doesn't know whether the pixels it contains came from a .jpeg, a .gif or anything else.

Since I'm passing NSImage an NSData with image data, something in Cocoa knows what the image came from, I was just hoping there was a way to find out. For example, if a user drag and drops a jpg on an NSImageView, how I can find out it was a jpg they dropped? The only way I can see to do that is to subclass and look at the drag pasteboard myself.

I decided to go ahead and sniff for known image types and those are the only ones I'm handling. Then I'm looking for compression factors from loaded images so I can use them when saving.


--
__________________________________________________________________________
"They that can give up essential liberty
Mark J. Lilback to obtain a little temporary safety
<email@hidden> deserve neither liberty or safety."
http://www.lilback.com/ -- Benjamin Franklin
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: determining format of NSImageRep (From: "John C. Randolph" <email@hidden>)

  • Prev by Date: popup buttons and notifications
  • Next by Date: Re: 3 obj-c/cocoa beginner q's
  • Previous by thread: Re: determining format of NSImageRep
  • Next by thread: IB framework
  • Index(es):
    • Date
    • Thread