-
We have cropped a PNG image using PHP-VIPS and ImageMagick. PHP-VIPS creates the smallest file-size (~7KB) vs ImageMagick (~24KB) with standard settings. However, ImageMagick's version does have more details. How do we configure the options? We can see that the crop method takes some optional named arguments: https://www.libvips.org/API/current/libvips-conversion.html#vips-crop https://github.com/libvips/php-vips/blob/v2.2.0/src/ImageAutodoc.php#L170 But where can we find the arguments? Thanks P.S. It would be nice to have a search option here: https://www.libvips.org/API/current/ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @boan-jfm, You need https://www.libvips.org/API/current/VipsForeignSave.html#vips-pngsave You can find these things by ^F on the function list: https://www.libvips.org/API/current/func-list.html which lists operations by what they do, or by ^F on the API index: https://www.libvips.org/API/current/api-index-full.html which indexes by the C function name. A better search would be nice, I agree :( It's unfortunate that phpdoc does not support optional arguments (as far as I know). |
Beta Was this translation helpful? Give feedback.
Hi @boan-jfm,
You need
pngsave
:https://www.libvips.org/API/current/VipsForeignSave.html#vips-pngsave
You can find these things by ^F on the function list:
https://www.libvips.org/API/current/func-list.html
which lists operations by what they do, or by ^F on the API index:
https://www.libvips.org/API/current/api-index-full.html
which indexes by the C function name.
A better search would be nice, I agree :(
It's unfortunate that phpdoc does not support optional arguments (as far as I know).