mcaselector icon indicating copy to clipboard operation
mcaselector copied to clipboard

Optimized images.

Open K0-RR opened this issue 4 years ago • 2 comments
trafficstars

Lossless compression.

K0-RR avatar Aug 04 '21 13:08 K0-RR

3 things:

  • It is nice that you minimized the size of the png files, but please could you give a little bit of detail about how you edited them? What program / workflow did you use to achieve this? I see that in some images the color palette has been changed, presumably to reduce the amount of data stored per pixel. This can potentially cause some problems with the way Java loads images. This is not the case right now with your changes and MCA Selector using a JavaFX Image to load them, but it might cause inconsistencies in behaviors in the future if this should change (especially when using BufferedImage instead).
  • The GitHub Logo cannot be modified, see here.
  • The point of the test images from the unit tests is that they are compared to images generated by MCA Selector. So those images should not be modified either.

Querz avatar Aug 04 '21 20:08 Querz

Sorry for no details, I write them if someone asks as I'm doing many prs like this recently. I used https://github.com/shssoichiro/oxipng for this, all compression was lossless, I'm not sure about any changes in the color palette - the number of colors is obviously the same, and here is a part of a log from my previous pr

    14x14 pixels, PNG format
    4x8 bits/pixel, RGBA
    IDAT size = 551 bytes
    File size = 608 bytes
Reducing image to 8 bits/pixel

is this what you meant by modified?

The command to achieve the same results is oxipng -o max -s full -r --fix. An slightly worse alternative to this is to use this Github bot.

The GitHub Logo cannot be modified

Ok, I can replace it with the original if this pr still seems helpful in any way.

The point of the test images from the unit tests is that they are compared to images generated by MCA Selector. So those images should not be modified either.

Could you point me which images are for those comparisons? Is this about this directory? https://github.com/Querz/mcaselector/tree/master/src/test

K0-RR avatar Aug 04 '21 21:08 K0-RR