views:

411

answers:

2

Is there a way to determine what file type was used to create a UIImage?

+2  A: 

Nope!

If this is for images you've loaded yourself you could store that association somewhere else instead. If the file is from elsewhere then it may not even have come from a file in the first place.

Andrew Grant
+3  A: 

Does it really matter what type the original image was? Can you implement whatever you want by inspecting the details of the underlying CGImageRef object (property is called CGImage) for alpha component information, etc?

For more details lookup the documentation for CGImage from the UIImage manual page.

jpm