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

Wrong color on book thumbnail #77

Closed
MEGAMENE opened this issue Jan 17, 2020 · 13 comments
Closed

Wrong color on book thumbnail #77

MEGAMENE opened this issue Jan 17, 2020 · 13 comments
Labels
bug Something isn't working released

Comments

@MEGAMENE
Copy link

I've noticed that some of my manga appear in a different color instead of just black and white on the book page thumbnails.
Here's an example:
originalPage
thumbnail

@MEGAMENE MEGAMENE changed the title Wront color on book thumbnail Wrong color on book thumbnail Jan 17, 2020
@gotson
Copy link
Owner

gotson commented Jan 17, 2020

Could you provide a link to the original file?

@MEGAMENE
Copy link
Author

Sure, here's the link:
https://files.catbox.moe/l8pwhs.cbz
It happens with a lot of files.

@gotson
Copy link
Owner

gotson commented Jan 17, 2020

Thanks. I did a quick test and i can confirm it's not coming from the imageio conversion, but from the thumbnail library in particular.

Their github repo is apparently full of issues with png images. I'll look for another library to replace it.

@gotson gotson added the bug Something isn't working label Jan 17, 2020
@gotson gotson closed this as completed in 1d5500d Jan 18, 2020
gotson pushed a commit that referenced this issue Jan 18, 2020
# [0.13.0](v0.12.0...v0.13.0) (2020-01-18)

### Bug Fixes

* **admin rpc:** fix transaction issues on thumbnails regeneration ([af8e3ea](af8e3ea))
* **thumbnails:** fix wrong color in thumbnails ([1d5500d](1d5500d)), closes [#77](#77)
* media comment was not reset properly ([b42eadf](b42eadf))
* **web reader:** first/last display to full height in double pages mode ([a7548e2](a7548e2))
* **web reader:** remove blank space between images in double pages mode ([b65b009](b65b009)), closes [#72](#72)

### Features

* **api:** search books by media status ([0790501](0790501))
* **book analyzer:** partial handling of archives with errors ([2605b1d](2605b1d)), closes [#57](#57)
* **browse book:** add button to read book when hovering on thumbnail ([c490e79](c490e79)), closes [#67](#67)
* **security:** add remember-me option ([003452b](003452b)), closes [#39](#39)
* **web reader:** add 'original' fit option ([d030044](d030044)), closes [#71](#71)
* **webui:** add Media Analysis screen showing all books in error ([27d46d5](27d46d5)), closes [#26](#26)
@gotson
Copy link
Owner

gotson commented Jan 18, 2020

🎉 This issue has been resolved in version 0.13.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@MEGAMENE
Copy link
Author

The new update seems to have broken some thumbnails, both in the book view and page preview.
Here's an example:
https://files.catbox.moe/mqrlj1.cbz

@gotson
Copy link
Owner

gotson commented Jan 18, 2020

What do you mean by "broken" ?

For the book thumbnails show in the gallery, you need to regenerate them, either via the admin endpoint (available via swagger), or by analyzing the books again (from the 3 dots menu).

For all thumbnails, you also need to clear your browser cache.

@gotson
Copy link
Owner

gotson commented Jan 18, 2020

It seems the first image of your file as alpha channels, hence the problem.

@MEGAMENE
Copy link
Author

MEGAMENE commented Jan 18, 2020

What do you mean by "broken" ?

For the book thumbnails show in the gallery, you need to regenerate them, either via the admin endpoint (available via swagger), or by analyzing the books again (from the 3 dots menu).

For all thumbnails, you also need to clear your browser cache.

I analyzed all of the files after the update and some don't generate the thumbnails.

Here's an example:
Annotation 2020-01-18 035344

@gotson
Copy link
Owner

gotson commented Jan 18, 2020

Both libraries have issues: the original one handles transparency channels, but generates color artefacts, the new one cannot handle alpha.

I would prefer incorrect colors to nothing, so i'll switch back to the original library.

@MEGAMENE
Copy link
Author

Both libraries have issues: the original one handles transparency channels, but generates color artefacts, the new one cannot handle alpha.

I would prefer incorrect colors to nothing, so i'll switch back to the original library.

Yeah, that's probably the best option of the two.
Maybe later there's another way to fix this problem, I don't know enough about java or images to be of any help.

@gotson
Copy link
Owner

gotson commented Jan 18, 2020

From what i've gathered, generating good looking thumbnails is complex enough that people wrote libraries to do it :) I have no plans on writing my own code for that!

@MEGAMENE
Copy link
Author

From what i've gathered, generating good looking thumbnails is complex enough that people wrote libraries to do it :) I have no plans on writing my own code for that!

Yeah, that makes sense.
Maybe an option would be to convert png to jpeg and then create the thumbnail?
That should remove the transparency problem, no?

@gotson
Copy link
Owner

gotson commented Jan 18, 2020

Nothing is as simple in the world of imaging, unfortunately.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

2 participants