• 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: image type of the AdressBook image data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: image type of the AdressBook image data


  • Subject: Re: image type of the AdressBook image data
  • From: "Ken Ferry" <email@hidden>
  • Date: Tue, 5 Aug 2008 01:08:04 -0700

You can use the ImageIO framework to do this:

CGImageSourceRef isrc = CGImageSourceCreateWithData((CFDataRef)data, NULL);
if (isrc) {
    CFStringRef imageType = CGImageSourceGetType(isrc);
    // see if imageType is among known types such as kUTTypeJPEG,
kUTTypeTIFF, kUTTypePNG
    CGImageSourceRelease(isrc);
}

-Ken

On Tue, Aug 5, 2008 at 12:36 AM, Wayne Shao <email@hidden> wrote:
> Hello,
>
> from  "Address Book Objective-C Framework Reference"
> http://developer.apple.com/documentation/UserExperience/Reference/AddressBook/Classes/ABPerson_Class/Reference/Reference.html#//apple_ref/occ/instm/ABPerson/imageData
>
> The imageData method returns NSData*.  Is there anyway to know the
> image type (e.g, PNG, TIFF, or JPEG) of the data?
>
> Wayne
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >image type of the AdressBook image data (From: "Wayne Shao" <email@hidden>)

  • Prev by Date: Re: Irritating Problem with NSString Method and File Paths
  • Next by Date: Re: Properties and memory management
  • Previous by thread: image type of the AdressBook image data
  • Next by thread: Re: image type of the AdressBook image data
  • Index(es):
    • Date
    • Thread