How does increasing image scale, affects on it's size in memory?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By neverdieboi

I’m currently trying do decrease size of my apk file. And I’m trying to use scaling instead of making big textures. However, when I head big textures size of apk was - 42.2 Mb, and after I made smaller texture and just scaled them - it is 46.6 Mb. It looks really strange. So I wanted to ask how scaling works with memory.

Are you measuring the memory consumption or the apk size?

Bubu | 2021-04-18 13:18

Apk size, but memory consumption also will be useful. Because I don`t know how it works.

neverdieboi | 2021-04-18 13:48

When Godot saves scenes, it saves parameters that were changed. For example, if you have a Sprite with a scale of 1, the scale will not be recorded as it is the default value. However, if it has a scale of 2, then the scene will be saved with the scale because it’s not the default value.

This size increase is insignificant and shouldn’t make any difference in file size.

I strongly recommended that you make a copy, put back the old textures and return the scale then exporting again. You may have changed something in your project so check again.

Bubu | 2021-04-18 14:00

Okay, thanks a lot :slight_smile:

neverdieboi | 2021-04-18 14:30

:bust_in_silhouette: Reply From: Jummit

The file size really shouldn’t change if the only thing you did was increase the scale property of a Sprite or TextureRect node. Are you sure you didn’t change anything else? And how large are the images files?

I’m sure that i changed only textures. So, for example - I have 2D pixel texture, and i used to import it already scaled - so I had drawn 64x64 texture, but I increased it in my texture-editor to 196x196. Size of 196x196 texture was - 3.4 KB, and 64x64 - 1.12 KB. So now I imported 64x64 image, scaled it inside Sprite properties, and apk file strangely increased. I didn’t find the solution yet, but I’ll be checking through my project.

neverdieboi | 2021-04-18 16:47