0

I want to import an image from UIPasteboard. The dataForPasteboardType: method gives me NSData of the image, but I have no idea whether that’s a GIF, PNG, JPEG or whatever. I can create an UIImage from the data without knowing the precise image type, but I’d like to have the MIME type for further processing. Is there a way to get it without analyzing the raw bytes?

zoul
  • 102,279
  • 44
  • 260
  • 354

1 Answers1

1

Maybe this can be helpful, is a method to get the MIME type from a file path: Determine MIME Type of NSData Loaded From a File

Community
  • 1
  • 1