0

I want to compress images before upload. I have tried the UIImagePngRepresentation but this is not what i'm looking for. Because this class shrinks the image in size by a percentage of it's original size. So a fixed percentage for all images won't be something good to do. Is there any adequate compression to do, so all the images get compressed to the same size before upload? Thanks!

Marc Ibrahim
  • 299
  • 5
  • 18
  • This will mean you get varying quality depending on the content and size of the image, is this what you want? – James P Nov 08 '16 at 13:52
  • yeah i want for example all pics to be 128kb or 1080p. that's an example. I don't want each pic to be reduced by half or by a percentage because a picture can be of good and it can be of bad quality... – Marc Ibrahim Nov 08 '16 at 13:54
  • These might help: http://stackoverflow.com/questions/11182591/how-can-i-optimize-uiimage-resizes-for-a-specific-target-filesize, http://stackoverflow.com/questions/20403805/how-to-downscale-a-uiimage-in-ios-by-the-data-size – James P Nov 08 '16 at 14:03

0 Answers0