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

🐛 Fix bug in WebpProcessor::generate #380

Merged
merged 3 commits into from
Aug 1, 2024
Merged

🐛 Fix bug in WebpProcessor::generate #380

merged 3 commits into from
Aug 1, 2024

Conversation

JMicheli
Copy link
Collaborator

@JMicheli JMicheli commented Aug 1, 2024

This pull request reverts some changes made in #351 which inadvertently caused generating Webp thumbnails to fail.

The problem, as identified in the Discord by @fehwalker, was caused by changes to WebpProcessor::generate which assumed that the input data was formatted as webp, meaning that attempts to convert non-webp images into webp would fail.

I've retained my changes to WebpProcessor::generate_from_path because they allow tests to pass that, in my view, should pass. In any event, this function is not called within Stump at any point, so it is likely irrelevant.

Copy link

codecov bot commented Aug 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Files Coverage Δ
core/src/filesystem/image/webp.rs 100.00% <100.00%> (ø)

Copy link
Collaborator

@aaronleopold aaronleopold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the quick fix!!

I've retained my changes to WebpProcessor::generate_from_path because they allow tests to pass that, in my view, should pass. In any event, this function is not called within Stump at any point, so it is likely irrelevant.

I think this is the right call, at least for a small PR aimed at fixing a bug. We can reevaluate the trait and this particular struct's impl of it as needed 🙂

@JMicheli JMicheli merged commit d59d547 into develop Aug 1, 2024
5 checks passed
@aaronleopold aaronleopold deleted the fix-webp branch August 1, 2024 14:30
@aaronleopold aaronleopold mentioned this pull request Aug 15, 2024
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