1

Reason for asking this question :

  • I have collection of images (.png) of about 1000+ in my Application Bundle.

  • Which taking alot of space while deploying the application on a device.

PS : I would like to know the different ways to reduce the size of an image without losing its quality.

All images are of 72 dpi, consisting of different pixels in sizes.

I cannot use any other format other than PNG as it the only acceptable format for iOS Mobile Application Development

  • If you are still using PNGs for anything other than the icon, please see my answer. – Tommie C. Apr 28 '16 at 14:58
  • You can also try to use many online website like miniimagesvideos.com – Neelam Jain Sep 1 '18 at 17:37
2

Do Not Use PNGs

You can also use SVG files saved as PDF files (open in illustrator and export as SVG-PDF). These work well as Universal sized images and should reduce the total number of images required (if you are using PNGs then you are using 3 times as many images are you actually need). Using these files as assets can therefore save 2/3 of the space you are currently using.

1 SVG = 3 PNGs (Context: Add PDF/SVG to Xcode Image Assets)

The one exception would be your iOS icon which is currently only supported outside of the image assets library.

0

To reduce file size with pngs, you have to remove some image information. Run your pngs through a program that uses pngquant and see if the loss is acceptable. A lot of times it is hard to see the difference.

Visit pngquant.org and download the appropriate program for your operating system.

You can also use TinyPNG which is an online service that compresses png images using pngquant mentioned above.

As an additional note, I develop iOS apps and of course you can use other formats than PNG. If your images do not require transparency, you can definitely get away with high quality JPEGs and save a ton of space.

0
  • Try to change the depth of the image, as well as the number of colors.
  • PNG-8 as opposed to PNG-24 may get you some size savings, as well as switching to 256 or fewer colors.
  • Also try turning off dithering and reducing color depth.

This Wikipedia article lists some tools that may help you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.