39 lines
1.3 KiB
XML
39 lines
1.3 KiB
XML
<?xml version="1.0"?>
|
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
]>
|
|
<refentry id="extending">
|
|
<refmeta>
|
|
<refentrytitle>Extending VIPS</refentrytitle>
|
|
<manvolnum>3</manvolnum>
|
|
<refmiscinfo>VIPS Library</refmiscinfo>
|
|
</refmeta>
|
|
|
|
<refnamediv>
|
|
<refname>Extending</refname>
|
|
<refpurpose>How to add operations to VIPS</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 id="extending-subclassing">
|
|
<title>Adding operations to VIPS</title>
|
|
<para>
|
|
All about subclassing. Copy-paste from the blog post about extending
|
|
vips8.
|
|
</para>
|
|
|
|
<para>
|
|
If you are writing a language binding, you won't need these. Instead, make
|
|
a new operation with vips_operation_new() (all it does is look up the
|
|
operation by name with vips_type_find(), then call g_object_new() for you),
|
|
then use vips_argument_map() and friends to loop over the operation's
|
|
arguments setting them. Once you have set all arguments, use
|
|
vips_cache_operation_build() to look up the operation in the cache and
|
|
either build or dup it. If something goes wrong, you'll need to use
|
|
vips_object_unref_outputs() and g_object_unref() to free the
|
|
partially-built object.
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|