Raw image background size

Hi,

I’m newbie in IOS app development. I found a pretty nice background picture for free, but my problem is it’s 10MB, res is 5472 × 3648. When I want to generate 1x,2x,3x assets from it, size increases to over 100MB. What is the minimum raw size for ios development? After the resize, I can export the assets in smaller size.

Any explanation, help would be appreciated!

Thanks!

hi @brobee,
for such cases, there is a bit of a cheating,

  • use lower res images and scale them up to the size you want at runtime
  • save the image as a JPG than a PNG
    I am not sure if TextureMaps would help you much here, but it’s worth a try
    There are utlities that compress the PNG files too

cheers,

Jayant

Yes, obviously I need to use lower res/ need to resize them, but the question, what is the expected minimum size in this case I do not want to resize it too much to avoid the final background look ugly…

Honestly, I did not get the point how can I scale them up to the size at runtime, do you have an example, or just a small explanation would be helpful.

Thanks!

Hi @brobee,
Here are some techniques that worked for me as there is no guide for this.

  • I used the ContentMode on imageView to AutoFit/AutoFill as required
  • The background used did not have a lot of details that would render choppy when scaled
  • It had a safe area, in case I let it crop when scaled
  • The safe res was @2x, which could scale up to @3x (taking advantage of how the Plus phones render)
  • This is entirely a trial and error in which you can determine how much before it starts to break/render ugly.

What is it that you had in mind?

cheers,

Jayant

This topic was automatically closed after 166 days. New replies are no longer allowed.