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?
Asked
Active
Viewed 1,546 times
0

zoul
- 102,279
- 44
- 260
- 354
1 Answers
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

Matteo Pompili
- 102
- 10