Wednesday, October 21, 2015

unity - Does the size of the image increases the game's size?


I have an image which is about 2mb in size and I want to use it as a background for my app.My question is, will this image add 2mb to the game's size (like for example the game is 20mb and after adding the image it will be 22mb) or will it get reduced when I add it to my app? I am using Unity by the way.



Answer



This will, of course, add some data to the app. However the actual APK may not increase by exactly the size of that image. It may be compressed with other files to mean that its slightly smaller.


If you're worried about the size of images in your app, you should consider using vector images, images that are made of drawing instructions instead of raw pixel data (yes I know most image formats aren't very close to raw pixel data at all), this can mean thta many images can be much smaller file sizes, this however doesn't work for things like real world photographs, which can be larger file sizes than traditional images. Vector formats also have the advantages of scaling to fit many resolutions without looking terrible.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...