Skip to content
Permalink
Browse files

Update function list for stream -> source rename

  • Loading branch information
kleisauke committed Jan 1, 2020
1 parent 95444d0 commit 31bf0e3cb7df8389a8a10fd87fcca176be913679
@@ -1,5 +1,5 @@
// headers for vips operations
// Mon 30 Dec 17:45:50 GMT 2019
// Wed 01 Jan 2020 12:22:11 PM CET
// this file is generated automatically, do not edit!

/**
@@ -1507,13 +1507,6 @@ VImage phasecor( VImage in2, VOption *options = 0 ) const;
*/
static VImage pngload( const char *filename, VOption *options = 0 );

/**
* Load png base class.
* @param options Optional options.
* @return Output image.
*/
static VImage pngload_base( VOption *options = 0 );

/**
* Load png from buffer.
* @param buffer Buffer to load from.
@@ -1,5 +1,5 @@
// bodies for vips operations
// Mon 30 Dec 17:45:35 GMT 2019
// Wed 01 Jan 2020 12:22:12 PM CET
// this file is generated automatically, do not edit!

VImage VImage::CMC2LCh( VOption *options ) const
@@ -2307,17 +2307,6 @@ VImage VImage::pngload( const char *filename, VOption *options )
return( out );
}

VImage VImage::pngload_base( VOption *options )
{
VImage out;

call( "pngload_base",
(options ? options : VImage::option())->
set( "out", &out ) );

return( out );
}

VImage VImage::pngload_buffer( VipsBlob *buffer, VOption *options )
{
VImage out;
@@ -404,7 +404,7 @@
<row>
<entry>draw_flood</entry>
<entry>Flood-fill an area</entry>
<entry>vips_draw_flood(), vips_draw_flood()</entry>
<entry>vips_draw_flood(), vips_draw_flood1()</entry>
</row>
<row>
<entry>draw_image</entry>
@@ -424,7 +424,7 @@
<row>
<entry>draw_rect</entry>
<entry>Paint a rectangle on an image</entry>
<entry>vips_draw_rect(), vips_rect(), vips_draw_rect1(), vips_draw_point(), vips_draw_point1()</entry>
<entry>vips_draw_rect(), vips_draw_rect1(), vips_draw_point(), vips_draw_point1()</entry>
</row>
<row>
<entry>draw_smudge</entry>
@@ -722,9 +722,9 @@
<entry>vips_jpegload_buffer()</entry>
</row>
<row>
<entry>jpegload_stream</entry>
<entry>Load image from jpeg stream</entry>
<entry>vips_jpegload_stream()</entry>
<entry>jpegload_source</entry>
<entry>Load image from jpeg source</entry>
<entry>vips_jpegload_source()</entry>
</row>
<row>
<entry>jpegsave</entry>
@@ -742,9 +742,9 @@
<entry>vips_jpegsave_mime()</entry>
</row>
<row>
<entry>jpegsave_stream</entry>
<entry>Save image to jpeg stream</entry>
<entry>vips_jpegsave_stream()</entry>
<entry>jpegsave_target</entry>
<entry>Save image to jpeg target</entry>
<entry>vips_jpegsave_target()</entry>
</row>
<row>
<entry>labelregions</entry>
@@ -987,9 +987,9 @@
<entry>vips_pngload_buffer()</entry>
</row>
<row>
<entry>pngload_stream</entry>
<entry>Load png from stream</entry>
<entry>vips_pngload_stream()</entry>
<entry>pngload_source</entry>
<entry>Load png from source</entry>
<entry>vips_pngload_source()</entry>
</row>
<row>
<entry>pngsave</entry>
@@ -1002,9 +1002,9 @@
<entry>vips_pngsave_buffer()</entry>
</row>
<row>
<entry>pngsave_stream</entry>
<entry>Save image to png stream</entry>
<entry>vips_pngsave_stream()</entry>
<entry>pngsave_target</entry>
<entry>Save image to target as png</entry>
<entry>vips_pngsave_target()</entry>
</row>
<row>
<entry>ppmload</entry>
@@ -1057,9 +1057,9 @@
<entry>vips_radload_buffer()</entry>
</row>
<row>
<entry>radload_stream</entry>
<entry>Load rad from stream</entry>
<entry>vips_radload_stream()</entry>
<entry>radload_source</entry>
<entry>Load rad from source</entry>
<entry>vips_radload_source()</entry>
</row>
<row>
<entry>radsave</entry>
@@ -1072,9 +1072,9 @@
<entry>vips_radsave_buffer()</entry>
</row>
<row>
<entry>radsave_stream</entry>
<entry>Save image to radiance stream</entry>
<entry>vips_radsave_stream()</entry>
<entry>radsave_target</entry>
<entry>Save image to radiance target</entry>
<entry>vips_radsave_target()</entry>
</row>
<row>
<entry>rank</entry>
@@ -1292,9 +1292,9 @@
<entry>vips_svgload_buffer()</entry>
</row>
<row>
<entry>svgload_stream</entry>
<entry>Load svg from stream</entry>
<entry>vips_svgload_stream()</entry>
<entry>svgload_source</entry>
<entry>Load svg from source</entry>
<entry>vips_svgload_source()</entry>
</row>
<row>
<entry>switch</entry>
@@ -1327,9 +1327,9 @@
<entry>vips_thumbnail_image()</entry>
</row>
<row>
<entry>thumbnail_stream</entry>
<entry>Generate thumbnail from stream</entry>
<entry>vips_thumbnail_stream()</entry>
<entry>thumbnail_source</entry>
<entry>Generate thumbnail from source</entry>
<entry>vips_thumbnail_source()</entry>
</row>
<row>
<entry>tiffload</entry>
@@ -1342,9 +1342,9 @@
<entry>vips_tiffload_buffer()</entry>
</row>
<row>
<entry>tiffload_stream</entry>
<entry>Load tiff from stream</entry>
<entry>vips_tiffload_stream()</entry>
<entry>tiffload_source</entry>
<entry>Load tiff from source</entry>
<entry>vips_tiffload_source()</entry>
</row>
<row>
<entry>tiffsave</entry>
@@ -1397,9 +1397,9 @@
<entry>vips_webpload_buffer()</entry>
</row>
<row>
<entry>webpload_stream</entry>
<entry>Load webp from stream</entry>
<entry>vips_webpload_stream()</entry>
<entry>webpload_source</entry>
<entry>Load webp from source</entry>
<entry>vips_webpload_source()</entry>
</row>
<row>
<entry>webpsave</entry>
@@ -1412,9 +1412,9 @@
<entry>vips_webpsave_buffer()</entry>
</row>
<row>
<entry>webpsave_stream</entry>
<entry>Save image to webp stream</entry>
<entry>vips_webpsave_stream()</entry>
<entry>webpsave_target</entry>
<entry>Save image to webp target</entry>
<entry>vips_webpsave_target()</entry>
</row>
<row>
<entry>worley</entry>
17 doc/gen-function-list.py 100755 → 100644
@@ -22,13 +22,18 @@
_OPERATION_DEPRECATED = 8


def gen_function(operation_name):
def gen_function(operation_name, overloads):
intro = Introspect.get(operation_name)

c_operations = 'vips_{}()'.format(operation_name)

if overloads:
c_operations += ', ' + (', '.join('vips_{}()'.format(n) for n in overloads))

result = '<row>\n'
result += ' <entry>{}</entry>\n'.format(operation_name)
result += ' <entry>{}</entry>\n'.format(intro.description.capitalize())
result += ' <entry>vips_{}()</entry>\n'.format(operation_name)
result += ' <entry>{}</entry>\n'.format(c_operations)
result += '</row>'

return result
@@ -71,10 +76,10 @@ def add_nickname(gtype, a, b):
'complex2': ['cross_phase'],
'complexget': ['real', 'imag'],
'draw_circle': ['draw_circle1'],
'draw_flood': ['draw_flood'],
'draw_flood': ['draw_flood1'],
'draw_line': ['draw_line1'],
'draw_mask': ['draw_mask1'],
'draw_rect': ['rect', 'draw_rect1', 'draw_point', 'draw_point1'],
'draw_rect': ['draw_rect1', 'draw_point', 'draw_point1'],
'extract_area': ['crop'],
'linear': ['linear1'],
'math': ['sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'exp', 'exp10', 'log', 'log10'],
@@ -95,9 +100,7 @@ def add_nickname(gtype, a, b):
[o + '_const1' for o in overloads['relational']]

for nickname in all_nicknames:
result = gen_function(nickname)
if nickname in overloads:
result = result.replace('()', '(), ' + (', '.join('vips_{}()'.format(n) for n in overloads[nickname])))
result = gen_function(nickname, overloads[nickname] if nickname in overloads else None)
print(result)


@@ -63,7 +63,7 @@ typedef struct _VipsForeignLoadPng {

typedef VipsForeignLoadClass VipsForeignLoadPngClass;

G_DEFINE_TYPE( VipsForeignLoadPng, vips_foreign_load_png,
G_DEFINE_ABSTRACT_TYPE( VipsForeignLoadPng, vips_foreign_load_png,
VIPS_TYPE_FOREIGN_LOAD );

static void
@@ -1,2 +1,2 @@
test_descriptors
test_streams
test_connections

0 comments on commit 31bf0e3

Please sign in to comment.
You can’t perform that action at this time.