- Home /
empy png takes the same size
If i import a png with a size of 1000x1000, and I imoprt another png with size of 1000x1000 only thing png is completely empty (nothing but transparent), their weight is 5MB both. why is that? it's also much larger then on my assets folder (I'm assuming thats the reason).
thanks!
OFC it is same size
think it like this: each pixel contains 32 bits of collors
now multiply 32 bits with 1000X1000 that's 4$$anonymous$$B
this is not jpg file but PNG witch is the least efficient file format
every pixel contains data what color is that pixel
and 2D array is 1000X1000 so 1k in each direction that's allot of pixels even for no color but it still takes 32 bits in to the array.
I'm probably a bit wrong about 32 bits as it's 5$$anonymous$$B as you say but general idea is that.
now jpg file has it differently
blank it'll contain: array size is 1000X1000 each one is collored 0.
so that's 2 integers for 1k and what color all of them contain.
so I'd guess it would become around 3B
Your answer