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

Simplify and speedup preview creating #660

Merged
merged 2 commits into from
Apr 5, 2022
Merged

Simplify and speedup preview creating #660

merged 2 commits into from
Apr 5, 2022

Conversation

qarmin
Copy link
Owner

@qarmin qarmin commented Apr 4, 2022

This PR drop time to create preview of images (time to creating preview of cr2 - 35 MB, 6240x4160 dropped from 3-4s to 1-2s)

Previous solution:

  • open image via image-rs
  • resize image to required size
  • save image to temporary file
  • load image from temporary file to gtk-rs image object

New solution:

  • open image via gtk-rs
  • resize pixbuf

Simpler and a lot of faster solution, but sadly looks that in current state not properly rotate some images(maybe migrating to GTK 4 will fix this behavior)

Also speedup comparing images.

Looks that alpha is fixed now

@qarmin qarmin added the enhancement New feature or request label Apr 4, 2022
@qarmin qarmin merged commit 39b2f4b into master Apr 5, 2022
@qarmin qarmin deleted the preview_creating branch April 5, 2022 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant