Reputation: 87
I have an app that takes a photo with the ipad camera and saves it in a sql database.
Is there away i can take a low resolution picture or a way i can reduce the picture resolution before i save it to the database.
thanks
Upvotes: 1
Views: 106
Reputation: 7707
You can use UIImageJPEGRepresentation
to reduce the quality. JPEGs are also much smaller than PNGs, if that's what you're currently saving them as.
NSData *jpegData = UIImageJPEGRepresentation(image, .8);
Upvotes: 1