• 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: Extracting filetype info from image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Extracting filetype info from image


  • Subject: Re: Extracting filetype info from image
  • From: "Diederik Hoogenboom (Eetay)" <email@hidden>
  • Date: Fri, 7 Apr 2006 09:32:01 +0200

Try this:

CGImageSourceRef imageSource = CGImageSourceCreateWithURL((CFURLRef) [NSURL fileURLWithPath:file],nil);
CFDictionaryRef metaDict = CGImageSourceCopyPropertiesAtIndex (imageSource,0,nil);
CFRelease(imageSource);



metaDict will contain the metadata for the image and can be cast to NSDictionary *.



Diederik

On 6-apr-2006, at 19:52, Ian was here wrote:

After I've loaded an image file, I would like to
extract such info as it's dpi and whether it's a TIFF,
JPEG, etc... Other than relying on the actual file
extension.

I checked the file attributes of the image before
loading it, and tried getting NSBitmapImageRep
attribute data after loading it. None seem to give the
specific info that I need. Converting an NSImage into
just about any other file format is easy. Extracting
the current file format info is proving to be quite a
challenge.


Thank you.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
 _______________________________________________
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

_______________________________________________ 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: 
 >Extracting filetype info from image (From: Ian was here <email@hidden>)

  • Prev by Date: Re: Change text size in NSTables
  • Next by Date: NSTextField & setPlaceHolderString
  • Previous by thread: Extracting filetype info from image
  • Next by thread: Calling Obj-C Class Methods From Java
  • Index(es):
    • Date
    • Thread