How are MZ tilesets compressed?

Hi,

Not feeling comfortable with there being space between wall and furniture, I decided to GIMP a tile sheet to make the interior look a little more natural (mainly by moving furniture up by 20 or 24px). The results are nice, but when looking at the file size it was three times larger than the original. I managed to shave off some by checking off various settings when exporting ( at 8 bit RGBA), but it's still 352 kb versus 147kb of the original. This, despite the fact that there's much less pixels than the original.

I'm not sure if this is something I need to worry about, but are there any recommendations for compressing this "properly"?


Inside_B_mod.png
The compression settings always depend on the image program used.
If your program doesn't have any settings for that, you can only use a different program or an online converter.
PNGs are generally fairly efficient. I'm thinking maybe you didn't merge some layers or something?
MZ's default resources are also set to Indexed. Maybe yours aren't anymore?
I'm thinking maybe you didn't merge some layers or something?
It's completely single layer, 8 bit RGBA with compression level 9 on GIMP, and all other options checked off so I suppose it's the limits of GIMP?
If your program doesn't have any settings for that, you can only use a different program or an online converter.
It does have lots of settings but this is the smallest I got. The online converters I tried mess with the shadows... are there any you can recommend?
MZ's default resources are also set to Indexed.
I'll just blush and admit I don't know what that means... would it make the filesize smaller?
I'll just blush and admit I don't know what that means... would it make the filesize smaller?
usually yes, especially for pixel art - but it has other limitations which is why it isn't automatic.

An indexed palette has a limited size - usually only 256 different colors. But that also means that each pixel can get its color definition from a single 8-bit-number.

non-indexed pictures allow the full color range by having each pixel either 24 or 32 bits for RGB or CMYK.

and if you need three or four times the bits/data, of course the filesize gets bigger.
but due to the color limitations it should only be used for pixel art, real world photos look really bad that way.
Andar already explains what it means, but if you have your tileset open in GIMP at the top bar next to the name it should say "(Indexed)". You can set it back to Indexed (if you wish) by clicking on 'Image -> Mode -> Indexed'.
Thank you both. I checked and it's already on indexed. 8-bit RGBA. Just out of curiosity... you do not have this issue with GIMP?
There may be other factors, but as far as compression goes...

The file size is based on the image dimensions for an uncompressed file format (BMP), but PNG is a compressed format. The resulting file should be smaller than its BMP version, but otherwise there's a lot of flexibility.

PNG uses a lossless compression algorithm: expressing the same data in fewer "words". A bit like saying "1 to 5" instead of "1, 2, 3, 4, 5". So the overall reduction in file size depends on both:
  • The means you are using to compress the data, e.g. PNG compression algorithms; and
  • The data itself, e.g. "200 x 200 px white rectangle" can generally be compressed a lot.
The PNG format supports varying "levels" of compression. In GIMP these are represented as values 0~9 when exporting the file. (I think it's set to 9 by default, though.)
If it's of any help, here is the GIMP tutorial explaining what compression is, how it works and how to choose the best level. I would have thought that everything it says is also applicable to other programs.
Thank you both. I checked and it's already on indexed. 8-bit RGBA. Just out of curiosity... you do not have this issue with GIMP?

I checked, and all my edited tilesets are the same size, or smaller, than the RTP. Maybe it's time to check if you have a good Gimp install?
Thanks for checking. Not sure what to look for to check if it's installed properly, but will try!

EDIT: after fiddling with the export settings, I did manage to save it with a smaller filesize and it also shows as "indexed alpha". However. It makes the shadows black, whereas in the original they are translucent grey. Would you be able to share your settings when you export modified PNGs?

Original thread: https://forums.rpgmakerweb.com/threads/how-are-mz-tilesets-compressed.159011/