Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimized images. #247

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Optimized images. #247

wants to merge 1 commit into from

Conversation

K0-RR
Copy link

@K0-RR K0-RR commented Aug 4, 2021

Lossless compression.

Lossless compression.
@Querz
Copy link
Owner

Querz commented Aug 4, 2021

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.

@K0-RR
Copy link
Author

K0-RR commented Aug 4, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants