start pydocs again

This commit is contained in:
John Cupitt 2014-11-05 14:56:59 +00:00
parent 8267dd2621
commit 7ae35c3edb
2 changed files with 20 additions and 8 deletions

View File

@ -1,4 +1,6 @@
/*
/* Test +/-* overloads with every combination of vector, image and double.
* This isn't a full test suite, look in the Python area for that.
*
* compile with:
*
* g++ -g -Wall test_overloads.cpp `pkg-config vips-cpp --cflags --libs`
@ -236,7 +238,7 @@ main( int argc, char **argv )
GOptionGroup *main_group;
GError *error = NULL;
if( vips_init( argv[0] ) )
if( VIPS_INIT( argv[0] ) )
vips_error_exit( NULL );
context = g_option_context_new( "" );
@ -254,6 +256,7 @@ main( int argc, char **argv )
vips_error_exit( NULL );
}
{
VImage left = VImage::new_from_file( argv[1] );
VImage right = VImage::new_from_file( argv[2] );
@ -261,6 +264,9 @@ main( int argc, char **argv )
test_binary_test_subtract( left, right );
test_binary_test_multiply( left, right );
test_binary_test_divide( left, right );
}
vips_shutdown();
return( 0 );
}

View File

@ -2,7 +2,7 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
]>
<!-- set ts=2 sw=2 expandtab; retab -->
<!-- vim: set ts=2 sw=2 expandtab: -->
<refentry id="using-from-python">
<refmeta>
<refentrytitle>VIPS from Python</refentrytitle>
@ -20,9 +20,11 @@
<para>
VIPS comes with a convenient, high-level Python API based
on <code>gobject-introspection</code>. As long as you can get GOI
for your platform, you should be able to use vips. The Vips.py file
for your platform, you should be able to use vips. The
<code>Vips.py</code> file
needs to be copied to the overrides directory of your GOI install,
and you need to have the vips typelib on your GI_TYPELIB_PATH.
and you need to have the vips typelib on your
<code>GI_TYPELIB_PATH</code>.
</para>
<example>
@ -48,9 +50,13 @@ im.write_to_file(sys.argv[2])
</example>
<para>
Reading the example, the first line loads the input file. There are
several other loaders: you can also load a formatted image (for example,
a JPEG format image)
Reading the example, the first line loads the input file. You can put load options after the
</para>
<para>
There are
several other constructors: you can load a formatted image (for example,
a JPEG format image) from a string with new_from_buffer()
</para>
</refsect1>