I have stored a few pictures using Safari's "Hold + Save Image" option to my Photo Library in simulator. When I pick an image from the library, I have to convert it to JPEG or PNG so I can upload it to the server. Issue is that the size of original image is around 200 KB but the image after converting to PNG is around 2 MB. I'm using UIImagePNGRepresentation to convert UIImage object to NSData and then posting the image.
What am I missing here? Why is the size of picture getting larger than its original size? How can I prevent this?
What's the difference between UIImageJPEGRepresentation and UIImagePNGRepresentation? Which one should be used (recommended)?
Can I determine the type of image loaded from photo library?
What is the default type of images captured by the iPhone camera (might seem a silly question)?