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

webP output is always lossy and cannot be requested as lossless #386

Closed
haynzz opened this issue Aug 29, 2023 · 6 comments
Closed

webP output is always lossy and cannot be requested as lossless #386

haynzz opened this issue Aug 29, 2023 · 6 comments
Labels
completed Feature or request has been completed documentation Improvements or additions to documentation enhancement New feature or request

Comments

@haynzz
Copy link

haynzz commented Aug 29, 2023

This seems to be the default behavior of libvips and you need to explicitly pass lossless as a parameter.
Currently there is not option to pass this param.

&q=100 does not yield the same results.

This is especially relevant for animated webP as their lossy versions are rarely appealing to the eye.

@haynzz haynzz changed the title webP output is always lossy and cannot be request as lossless webP output is always lossy and cannot be requested as lossless Aug 30, 2023
@kleisauke kleisauke added the enhancement New feature or request label Aug 31, 2023
@kleisauke
Copy link
Member

Would adding a new parameter to control this (e.g. &ll) work for you?

Let's mark this as an enhancement, I think it should be straightforward to add code-wise.

@haynzz
Copy link
Author

haynzz commented Sep 1, 2023

I think that would be the suitable solution.

kleisauke added a commit that referenced this issue Sep 1, 2023
To control whether the resulting image should be lossless compressed.

This only applies to formats that offer both lossy and lossless
compression capabilities, such as WebP.
@kleisauke kleisauke added started This issue is being worked on documentation Improvements or additions to documentation labels Sep 1, 2023
@kleisauke
Copy link
Member

This has been implemented with commit 0674c39, which has just been rolled out to production. Thanks for reporting this!

Documentation will be updated later to reflect this.

@haynzz
Copy link
Author

haynzz commented Sep 4, 2023

Wow! This was quick.
I did not expect this.
Can you help me find out which Release has this change now?

@kleisauke
Copy link
Member

@haynzz You can find it in the latest pre-built Docker image at ghcr.io/weserv/images:5.x, which is automatically built from the 5.x branch.

A new Git tag for this feature has not been published yet; it's currently blocked on true streaming support.

# TODO(kleisauke): Enable once magickload_source is supported in libvips
#if (VIPS_VERSION VERSION_GREATER_EQUAL 8.13)
# target_compile_definitions(${PROJECT_NAME}
# PUBLIC
# WESERV_ENABLE_TRUE_STREAMING
# )
#endif()

@kleisauke kleisauke added completed Feature or request has been completed and removed started This issue is being worked on labels Mar 23, 2024
@kleisauke
Copy link
Member

Documentation has been updated.
https://wsrv.nl/docs/format.html#lossless-compression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed Feature or request has been completed documentation Improvements or additions to documentation enhancement New feature or request
Development

No branches or pull requests

2 participants