Closed RiskoZoSlovenska closed 2 years ago
Hi @RiskoZoSlovenska,
Most libvips operations are defined as subclasses of VipsOperation, and they all just appear in lua-vips automatically. A few very simple things (eg. addalpha, which is just two lines of code) are tiny convenience functions and are implemented in the bindings themselves.
I'd implement addalpha in lua in Image_methods.lua
, which I guess is what you've done in your PR. I'll have a look.
The VIPS docs mention an
addalpha()
function, but attempting to callimage:addalpha()
results in aVipsOperation: class "addalpha" not found
error. I'm not sure why exactly this is. It's mentioned here thataddalpha
is just a convenience function forbandjoin_const
, but I don't see what makes it different from any other operation that the binding supports.I'd open a PR, but thing is, I'm not sure how to implement it. Typically, I'd just make a call to
vips_lib.vips_addalpha()
, but pyvips defines the function manually, so there might be something I'm missing.