libvips / pyvips

python binding for libvips using cffi
MIT License
642 stars 49 forks source link

Missing optional parameters for VIPS_ARGUMENT_OPTIONAL_OUTPUT #36

Closed kleisauke closed 6 years ago

kleisauke commented 6 years ago

See for example: https://jcupitt.github.io/pyvips/vimage.html#pyvips.Image.labelregions versus: http://jcupitt.github.io/libvips/API/current/libvips-morphology.html#vips-labelregions

If a user wants to get the number of regions then they have to call labelregions in the following way: https://github.com/jcupitt/pyvips/blob/d1e690de8ecb947b116a9db606d121bef0a86f90/tests/test_morphology.py#L18

The auto-generated docs haven't described this parameter. To fix this, an libvips argument that has been tagged as VIPS_ARGUMENT_OPTIONAL_OUTPUT should also be included in the optional parameters (as boolean type).

jcupitt commented 6 years ago

Ooop, you're right, I'll have a look.

jcupitt commented 6 years ago

I updated the preformatted docs:

https://jcupitt.github.io/pyvips/vimage.html#pyvips.Image.labelregions

Thanks for pointing out the dumbness Kleis!