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

[Bug]: incorrect / 'area repeateated' thumbnails generated #302

Closed
1 task done
gsxgmpkt9020 opened this issue Dec 11, 2024 · 4 comments
Closed
1 task done

[Bug]: incorrect / 'area repeateated' thumbnails generated #302

gsxgmpkt9020 opened this issue Dec 11, 2024 · 4 comments
Assignees
Milestone

Comments

@gsxgmpkt9020
Copy link

Preflight Checklist

  • I have searched the issue tracker for a bug report that matches the one I want to file, without success.

OpenComic Version

1.3.1

Operating System

WIN 10 22H2 19045.3324

Installed via

.exe

Steps to reproduce

export cbz files, open the library

Expected Behavior

correct thumnails for all files

Actual Behavior

incorrect / 'area repeateated' thumbnails for some files

20241211135321001
20241211135358002
20241211135441003
20241211135600004

Error message

None

Additional Information

I remember this will not happen on 1.2.0 version app

Sample file

No response

@gsxgmpkt9020
Copy link
Author

gsxgmpkt9020 commented Dec 11, 2024

If I rename the file , the new thumbnail will be corrected

@ollm ollm self-assigned this Dec 11, 2024
@ollm
Copy link
Owner

ollm commented Dec 11, 2024

I have made some changes to fix this bug c415b3f

This happens because 7-zip or node-7z sometimes gives as extracted an file/image while it is still writing it to disk, so OpenComic starts generating the thumbnail with the partially extracted image. Previously in v1.2.0, in this cases the thumbnails were not generated, since the library used for images (sharp) provides an error if the image is corrupted, but in v1.3.0 I enabled in sharp an option to force work in corrupted images to fix this, I did some testing and it seemed to generate thumbnails correctly, but it only seems to do so for progressive JPGs and not regular PNGs or JPGs.

With the new fix, the behavior is now the following.

  • The thumbnail is generated with the work in corrupted images option disabled.
  • If it gives an error, it is tried again after a 100 milliseconds 2 more times.
  • If the thumbnail still cannot be generated, it tries once more time but with the option to work in corrupted images enabled.

Buid: https://mega.nz/file/SPIUkATJ#f5zq2Ku3N-FoJBWc0yqVCcBrazBwEbiJSn5A5rEqSws

@ollm ollm added this to the v1.3.2 milestone Dec 11, 2024
@ollm
Copy link
Owner

ollm commented Dec 11, 2024

I forgot to mention that for the thumbnails that are already generated you will have to clear the cache from the app settings.

@gsxgmpkt9020
Copy link
Author

It's OK now

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

No branches or pull requests

2 participants