0

Very simple question.

Is there any way to tell whether a picture picked from the photo library is a jpg file or a png file?

Since some other app's work may also be in the library, so I need to know this.

More specifically, what I need is only to tell whether that photo is a JPEG image.

Thanks !

dplante
  • 2,445
  • 3
  • 21
  • 27
Wang Liang
  • 941
  • 2
  • 15
  • 34

1 Answers1

0

Did you try this?

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo

This UIImagePickerControllerDelegate has a parameter called editingInfo. This dictionary contains a value for a key called UIImagePickerControllerMediaType. This tells about the image type.

cocoakomali
  • 1,346
  • 1
  • 8
  • 7