diff --git a/libvips/conversion/im_embed.c b/libvips/conversion/im_embed.c index 6536d4a3..d7e37b55 100644 --- a/libvips/conversion/im_embed.c +++ b/libvips/conversion/im_embed.c @@ -437,6 +437,8 @@ embed( IMAGE *in, IMAGE *out, int flag, int x, int y, int w, int h ) * * * + * + * See also: im_extract(), im_insert(). * * Returns: 0 on success, -1 on error. */ diff --git a/libvips/conversion/im_replicate.c b/libvips/conversion/im_replicate.c index f374a5fe..60ac948a 100644 --- a/libvips/conversion/im_replicate.c +++ b/libvips/conversion/im_replicate.c @@ -4,6 +4,8 @@ * * 15/4/04 * - some optimisations for some cases + * 1/2/10 + * - gtkdoc */ /* @@ -46,7 +48,6 @@ #include #include #include -#include #include @@ -117,7 +118,7 @@ replicate_gen( REGION *or, void *seq, void *a, void *b ) paint.left -= x; paint.top -= y; - assert( !im_rect_isempty( &paint ) ); + g_assert( !im_rect_isempty( &paint ) ); /* Render into or. */ @@ -130,6 +131,19 @@ replicate_gen( REGION *or, void *seq, void *a, void *b ) return( 0 ); } +/** + * im_replicate: + * @in: input image + * @out: output image + * @across: repeat @in this many times across + * @down: repeat @in this many times down + * + * Replicate an image x times horizontally and vertically. + * + * See also: im_embed(), im_copy(). + * + * Returns: 0 on success, -1 on error. + */ int im_replicate( IMAGE *in, IMAGE *out, int across, int down ) { @@ -137,9 +151,8 @@ im_replicate( IMAGE *in, IMAGE *out, int across, int down ) im_error( "im_replicate", "%s", _( "bad parameters" ) ); return( -1 ); } - if( im_piocheck( in, out ) ) - return( -1 ); - if( im_cp_desc( out, in ) ) + if( im_piocheck( in, out ) || + im_cp_desc( out, in ) ) return( -1 ); out->Xsize *= across; out->Ysize *= down;