tom-anders / Easy_xkcd

An easy and simple open source xkcd reader
Apache License 2.0
164 stars 41 forks source link

fix: comic 2622 coloring #333

Closed FineFindus closed 1 year ago

FineFindus commented 1 year ago

Partially fixing #305, by adding comic 2622 as a special case.

Before After
Before After

Of course, this does not solve the general problem of some comics being incorrectly inverted. I think one solution might be to check each pixel color, but I'm not sure whether that would perform well enough. Should I open a new issue about possible solutions?

tom-anders commented 1 year ago

Thanks!

Sure, feel free to open a new issue if you have ideas on how to improve this - Bur I'm not sure if checking every pixel is worth it though, our current solution of (ab)using Palette.from(bitmap).generate().vibrantSwatch seems to work well enough for most comics.

Note that sometimes we may want to invert an image even though it contains color, for example some comics are black and white except for some red text added for emphasis, in which case it's ok (and better IMO) to invert the colors anyway.

Maybe the best course of action would be to just go through https://www.explainxkcd.com/wiki/index.php/Category:Comics_with_color and add more special cases for where our heuristic fails.