php-vips icon indicating copy to clipboard operation
php-vips copied to clipboard

[Feature Request] Renaming Second Parameter from width to length in thumbnail operations

Open AmitSonkhiya opened this issue 2 years ago • 1 comments

Hi,

Do you think if it would be better to rename the second parameter width to length in *thumbnail related methods? For me, at the first glance, the name width in documents/code appears like the standard length in x axis strictly. And it misleads when the methods take higher side in consideration and create a 100x200px thumbnail for 400x800px vertical image when width = 200 is specified (with width = 200, it seems as a thumbnail with 200px length in x axis).

Thank you

AmitSonkhiya avatar Jul 20 '23 03:07 AmitSonkhiya

We can't rename parameters in libvips without breaking API, so we can't make this change. The docs explain what the param means.

jcupitt avatar Jul 20 '23 10:07 jcupitt