libvips / php-vips-ext

Low-level libvips binding for PHP
MIT License
101 stars 11 forks source link

options for webpsave #27

Closed rosell-dk closed 5 years ago

rosell-dk commented 5 years ago

Many of the webp options of webpsave are rejected. I would have assumed that the options for libvips vips_webpsave would be working

The following works:

vips_call('webpsave', $im, ['Q' => 80]);

But the following does not:

vips_call('webpsave', $im, ['smart_subsample' => true]);

It produces the following error (received with vips_error_buffer()):

webpsave: no property named 'smart_subsample'

I get the same result when using vips_image_write_to_file and when using the webpsave method of \Jcupitt\Vips\Image

The following options works with webpsave: Q, lossless, strip The following options does not work, and produces an error similar to above: preset, near_lossless, smart_subsample, alpha_q

I'm on: vips version: 8.2.2, vips extension version: 1.0.9, ubuntu 16.04, apache, fpm

jcupitt commented 5 years ago

Hello @rosell-dk,

vips 8.2 is pretty old, I would update to 8.7. 8.8 is due soon, which adds yet more webpsave options.

rosell-dk commented 5 years ago

ah, ok, thanks!