Skip to content
Discussion options

You must be logged in to vote

Hello @asonix,

new_from_buffer() etc. are part of the C language binding and need to be reimplemented for other languages. For example, the python binding does this:

https://github.com/libvips/pyvips/blob/master/pyvips/vimage.py#L332-L366

It's a performance issue. When you pass large objects, you need to control copy behaviour, and you can't do that from the C side without extra (possibly unnecessary) copies.

The libvips C API is supposed to be convenient for humans to write, but it's a pretty terrible target for language bindings. The heavy use of varargs is very tricky, for example. libvips has a lower-level GObject API that's designed for binding (the C API is a thin skin over this lay…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@asonix
Comment options

Answer selected by asonix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #4247 on November 08, 2024 06:00.