plan2net / webp

Create a WebP copy for images (TYPO3 CMS)
GNU General Public License v3.0
60 stars 34 forks source link

Feature Request cWebP support #10

Closed the-hotmann closed 5 years ago

the-hotmann commented 5 years ago

Like stated here https://github.com/plan2net/webp/issues/8 I will create this Feature Request ticket to ask for cwebp support. Maybe this will be better then using ImacgeMagick or GraphicsMagick.

This idea belongs to @DanielRuf

DanielRuf commented 5 years ago

Maybe this will be better then using ImacgeMagick or GraphicsMagick.

To clarify a short user story:

As user I want to convert images to WebP using the official and native libwebp in the cwebp binary if it is available on the path or locally.

I can either let the extension check for the cwebp binary in the path, or provide the custom path to the binary directly (to overwrite / set it to the right one) or decide to download the latest build for the OS family and let the extension place it somewhere and use this.

wazum commented 5 years ago

I'll add this in the upcoming weeks

wazum commented 5 years ago

Available in master, update of documentation follows. After finishing these tasks I'll release a new tagged version. You may already test @DanielRuf @M4rt1n17 Feedback welcome!

the-hotmann commented 5 years ago

So I will try it in a few days :)

the-hotmann commented 5 years ago

Sorry for the late answer.

I tested both: the old, and the new version.

I have to say: I dont like the new one. I dont know what actually changed but now webP Images are getting bigger then the JPG, this is not what webP was supposed to be.

For me quality is most important so I compare at this settings: -quality 100 -define webp:lossless=true

Old Version: -40% Data New Version: +500% Data

I just want to have the best quality at the best lossless compression.

Here a little comparison.

Old Version: webP old

New Version: webP

This does not belong to here normaly but in settings a "external" adapter could be chosen, with a refference to the docu, but cant find any info about this external adapter.

My conclusion: pls revert back to the old way of converting Images...

DanielRuf commented 5 years ago

-quality 100 -define webp:lossless=true

WebP is lossless, 75 - 80 should be sufficient, even the difference of 60 can not be seen by the human eye in most cases.

DanielRuf commented 5 years ago

https://github.com/plan2net/webp/commit/53ee8991ea59cd2c83543380395570ce639c5d20 should be the commit which includes the changes.

the-hotmann commented 5 years ago

-quality 100 -define webp:lossless=true

WebP is lossless, 75 - 80 should be sufficient, even the difference of 60 can not be seen by the human eye in most cases.

Thats not completely true if you saved your JPG in 100% Quality or if oyu removed all EXIF/Meta Datas, so you dont know at whioch Quality % it has been saved.

Also before (with ImageMagick I guess) it produced much smaller images which really no difference in quality.

Yes external Adapters would be cool! Also I would like to include libvips binaries (like the cwebp binaries) to test things with libvips

wazum commented 5 years ago

Thanks @M4rt1n17 for the test, even though I can't make any use of it … processing didn't change, so I need more specific information on your comparison. Whatever you choose (the built-in MagickAdapter or an external binary) it's up to you to set the right parameters for the desired quality. This has nothing to do with this extension. The extension just calls the binary with the given parameters (you set). If you set wrong parameters you have to change them to get proper results. This lack of understanding comes again and again in your comments, unfortunately I do not know how to document that so it's clear for you and others. Any recommendations welcome!

Maybe it helps if you answer the following questions for both tests of yours:

wazum commented 5 years ago

@M4rt1n17 libvips … as said before, you can set the ExternalAdapter and use any binary on your server (and set the right parameters) for conversion you like … that's not restricted to cwebp

wazum commented 5 years ago

@DanielRuf setting the right parameters is up to you … the default values are for the built-in MagickAdapter and just defaults, nothing else. Adapt them to your needs.

DanielRuf commented 5 years ago

@DanielRuf setting the right parameters is up to you … the default values are for the built-in MagickAdapter and just defaults, nothing else. Adapt them to your needs.

I am fully aware of this =) Just wanted to point out that 100 like @M4rt1n17 uses is not really needed imo. Especially for web(sites).

the-hotmann commented 5 years ago

@M4rt1n17 libvips … as said before, you can set the ExternalAdapter and use any binary on your server (and set the right parameters) for conversion you like … that's not restricted to cwebp

Could not find any ExternalAdapter settings so far. How to use that exactly?