Closed RiskoZoSlovenska closed 8 months ago
Hello again,
I think the best solutions would be to either make vips_addalpha
a true operation (and so skip the wrapping), or to fix the python implementation of this utility function. Calling into the C wrapper from the python wrapper would be fiddly and error-prone.
I pushed https://github.com/libvips/pyvips/commit/3c927624eda87d8e308b723ecbdd98823b1803cf and credited you.
The following Python code:
produces
whereas the (hopefully) equivalent C code:
Click to open
(this is my first time calling libvips from C — if I'm doing something wrong, please let me know!) ```c #includeproduces
This happens because pyvips re-implements the
addalpha
function, and this (re-)implementation wasn't updated when the upstream changed.I'm opening this as an issue instead of directly PRing a fix because it may be worthwhile to consider using the libvips API directly so that issues like this can be avoided in the future.