Search Unity

Compression of jpg Sprites not working

Discussion in 'Editor & General Support' started by Capricornum, Feb 2, 2021.

  1. Capricornum

    Capricornum

    Joined:
    Feb 1, 2018
    Posts:
    22
    Dear Community,

    in my private project I have a lot of sprites. When I built my game I used the editor log to look at the size of my assets.
    Editor Log Screenshot.png
    A bunch of these sprites end up as assets with 2.3 megabyte and a few others end up as assets with 360kb. The only difference between these sprites that I found is the warning in the inspector:
    "only textures with width/height being multiple of 4 can be compressed to DTX1 format"
    Looking at the size of the jpgs in the assets folder of my project I found that the resolutions of my images are very different and barely any of them have the required 'multiple of 4' relation.
    Here is what I found:
    The images that are compressed have ratios of:
    - 755 * 1051
    - 756 * 1052
    - 752 * 1052
    - 755 * 1056
    The images that are not compressed have ratios of:
    - 755 * 1055
    - 756 * 1051
    - 755 * 1052
    - 752 * 1051

    Can anyone explain this behavior? I am utterly confused. And since my project of only a few cards has 500mb I want to reduce that size.
     
  2. Capricornum

    Capricornum

    Joined:
    Feb 1, 2018
    Posts:
    22
    I ended up simply doing what Unity recommends and altering all images to a width/heigh ratio multiple of 4. The confusion about what I described above remains. However the image compression works now. My game is now 180mb instead of 500mb.