This commit is contained in:
John Cupitt 2009-09-24 16:20:12 +00:00
parent b3f2c93c5d
commit 150865045f
13 changed files with 180 additions and 178 deletions

View File

@ -45,6 +45,7 @@
- renamed im_eorconst() as im_eorimage_const() for consistency, also and, or
- relational revised: smaller, more general, faster
- im_blend() allows many-band conditional, 1-band then/else
- im_blend() allows band and format to differ between then and else parts
25/3/09 started 7.18.0
- revised version numbers

13
TODO
View File

@ -1,15 +1,4 @@
- test im_blend, including new n-band cond + n-band a/b mode
- do the same to im_ifthenelse
- should we bandup then/else too? could have
4 band cond
1 band then
4 band else
I guess
- do im_ifthenelse
- we have tools/ and contrib/ argh

View File

@ -184,6 +184,19 @@ im__format_common( IMAGE *in1, IMAGE *in2 )
return( bandfmt_largest[in1->BandFmt][in2->BandFmt] );
}
int
im__formatalike( IMAGE *in1, IMAGE *in2, IMAGE *out1, IMAGE *out2 )
{
VipsBandFmt fmt;
fmt = im__format_common( in1, in2 );
if( im_clip2fmt( in1, out1, fmt ) ||
im_clip2fmt( in2, out2, fmt ) )
return( -1 );
return( 0 );
}
/* Make an n-band image. Input 1 or n bands.
*/
int
@ -209,15 +222,27 @@ im__bandup( IMAGE *in, IMAGE *out, int n )
return( im_gbandjoin( bands, out, n ) );
}
int
im__bandalike( IMAGE *in1, IMAGE *in2, IMAGE *out1, IMAGE *out2 )
{
if( im_check_bands_1orn( "im__bandalike", in1, in2 ) )
return( -1 );
if( im__bandup( in1, out1, IM_MAX( in1->Bands, in2->Bands ) ) ||
im__bandup( in2, out2, IM_MAX( in1->Bands, in2->Bands ) ) )
return( -1 );
return( 0 );
}
/* The common part of most binary arithmetic, relational and boolean
* operators. We:
*
* - check in and out
* - cast in1 and in2 up to a common format
* - cast the common format to the output format with the supplied table
* - equalise bands
* - run the supplied buffer operation passing one of the up-banded and
* up-casted inputs as the first param
* - equalise bands and size
* - run the supplied buffer operation passing one of the up-banded,
* up-casted and up-sized inputs as the first param
*/
int
im__arith_binary( const char *name,
@ -225,7 +250,6 @@ im__arith_binary( const char *name,
int format_table[10],
im_wrapmany_fn fn, void *b )
{
VipsBandFmt fmt;
IMAGE *t[5];
if( im_piocheck( in1, out ) ||
@ -235,39 +259,32 @@ im__arith_binary( const char *name,
im_check_uncoded( name, in2 ) )
return( -1 );
if( im_cp_descv( out, in1, in2, NULL ) )
/* Cast our input images up to a common format and bands.
*/
if( im_open_local_array( out, t, 4, "im__arith_binary", "p" ) ||
im__formatalike( in1, in2, t[0], t[1] ) ||
im__bandalike( t[0], t[1], t[2], t[3] ) )
return( -1 );
/* What number of bands will we write?
/* Generate the output.
*/
out->Bands = IM_MAX( in1->Bands, in2->Bands );
if( im_cp_descv( out, t[2], t[3], NULL ) )
return( -1 );
/* What output type will we write? int, float or complex.
/* What number of bands will we write? Same as up-banded input.
*/
out->BandFmt = format_table[im__format_common( in1, in2 )];
out->Bands = t[2]->Bands;
/* What output type will we write?
*/
out->BandFmt = format_table[t[2]->BandFmt];
out->Bbits = im_bits_of_fmt( out->BandFmt );
if( im_open_local_array( out, t, 4, "type cast:1", "p" ) )
return( -1 );
/* Cast our input images up to a common type.
*/
fmt = im__format_common( in1, in2 );
if( im_clip2fmt( in1, t[0], fmt ) ||
im_clip2fmt( in2, t[1], fmt ) )
return( -1 );
/* Force bands up to the same as out.
*/
if( im__bandup( t[0], t[2], out->Bands ) ||
im__bandup( t[1], t[3], out->Bands ) )
return( -1 );
/* And process! The buffer function gets one of the input images as a
* sample.
*/
t[4] = NULL;
if( im_wrapmany( t + 2, out, fn, t[0], b ) )
if( im_wrapmany( t + 2, out, fn, t[2], b ) )
return( -1 );
return( 0 );

View File

@ -191,26 +191,26 @@ im_remainder( IMAGE *in1, IMAGE *in2, IMAGE *out )
} \
}
/* Cast a vector of double to the type of IMAGE.
/* Cast a vector of double to a passed format.
*/
static PEL *
make_pixel( IMAGE *out, int n, double *p )
make_pixel( IMAGE *out, VipsBandFmt fmt, int n, double *p )
{
PEL *q;
int i;
if( !(q = IM_ARRAY( out, n * IM_IMAGE_SIZEOF_ELEMENT( out ), PEL )) )
if( !(q = IM_ARRAY( out, n * (im_bits_of_fmt( fmt ) >> 3), PEL )) )
return( NULL );
switch( out->BandFmt ) {
case IM_BANDFMT_CHAR: CAST( signed char ); break;
case IM_BANDFMT_UCHAR: CAST( unsigned char ); break;
case IM_BANDFMT_SHORT: CAST( signed short ); break;
case IM_BANDFMT_USHORT: CAST( unsigned short ); break;
case IM_BANDFMT_INT: CAST( signed int ); break;
case IM_BANDFMT_UINT: CAST( unsigned int ); break;
case IM_BANDFMT_FLOAT: CAST( float ); break;
case IM_BANDFMT_DOUBLE: CAST( double ); break;
switch( fmt ) {
case IM_BANDFMT_CHAR: CAST( signed char ); break;
case IM_BANDFMT_UCHAR: CAST( unsigned char ); break;
case IM_BANDFMT_SHORT: CAST( signed short ); break;
case IM_BANDFMT_USHORT: CAST( unsigned short ); break;
case IM_BANDFMT_INT: CAST( signed int ); break;
case IM_BANDFMT_UINT: CAST( unsigned int ); break;
case IM_BANDFMT_FLOAT: CAST( float ); break;
case IM_BANDFMT_DOUBLE: CAST( double ); break;
case IM_BANDFMT_COMPLEX: CASTC( float ); break;
case IM_BANDFMT_DPCOMPLEX: CASTC( double ); break;
@ -223,7 +223,8 @@ make_pixel( IMAGE *out, int n, double *p )
int
im__arith_binary_const( const char *name,
IMAGE *in, IMAGE *out, int n, double *c,
IMAGE *in, IMAGE *out,
int n, double *c, VipsBandFmt vfmt,
int format_table[10],
im_wrapone_fn fn1, im_wrapone_fn fnn )
{
@ -238,9 +239,17 @@ im__arith_binary_const( const char *name,
out->BandFmt = format_table[in->BandFmt];
out->Bbits = im_bits_of_fmt( out->BandFmt );
/* Cast vector to output type.
/* Some operations need the vector in the input type (eg.
* im_equal_vec() where the output type is always uchar and is useless
* for comparisons), some need it in the output type (eg.
* im_andimage_vec() where we want to get the double to an int so we
* can do bitwise-and without having to cast for each pixel), some
* need a fixed type (eg. im_powtra_vec(), where we want to keep it as
* double).
*
* Therefore pass in the desired vector type as a param.
*/
if( !(vector = make_pixel( out, n, c )) )
if( !(vector = make_pixel( out, vfmt, n, c )) )
return( -1 );
/* Band-up the input image if we have a >1 vector and
@ -350,7 +359,7 @@ remainderconst1_buffer( PEL *in, PEL *out, int width, PEL *vector, IMAGE *im )
}
static void
remainderconst_buffer( PEL *in, PEL *out, int width, PEL *vector, IMAGE *im )
remainderconstn_buffer( PEL *in, PEL *out, int width, PEL *vector, IMAGE *im )
{
int b = im->Bands;
int i, x, k;
@ -399,10 +408,10 @@ im_remainder_vec( IMAGE *in, IMAGE *out, int n, double *c )
return( -1 );
return( im__arith_binary_const( "im_remainder",
in, out, n, c,
in, out, n, c, in->BandFmt,
bandfmt_remainder,
(im_wrapone_fn) remainderconst1_buffer,
(im_wrapone_fn) remainderconst_buffer ) );
(im_wrapone_fn) remainderconstn_buffer ) );
}
/**

View File

@ -67,22 +67,22 @@
*/
#define CONST1( IN, OUT, FUN ) { \
OUT *tq = (OUT *) q; \
OUT tc = *((OUT *) vector); \
IN *tp = (IN *) p; \
\
for( i = 0; i < ne; i++ ) \
FUN( tq[i], tp[i], tc ); \
FUN( tq[i], tp[i], c ); \
}
/* Operator with a single constant on a buffer.
*/
#define CONST1_BUFFER( FUN ) \
static void \
FUN ## 1_buffer( PEL *p, PEL *q, int n, PEL *vector, IMAGE *im ) \
FUN ## 1_buffer( PEL *p, PEL *q, int n, double *tc, IMAGE *im ) \
{ \
/* Complex just doubles the size. \
*/ \
const int ne = n * im->Bands * (im_iscomplex( im ) ? 2 : 1); \
const double c = tc[0]; \
\
int i; \
\
@ -118,7 +118,6 @@ FUN ## 1_buffer( PEL *p, PEL *q, int n, PEL *vector, IMAGE *im ) \
#define CONSTN( IN, OUT, FUN ) { \
OUT *tq = (OUT *) q; \
IN *tp = (IN *) p; \
OUT *tc = (OUT *) vector; \
\
for( i = 0, x = 0; x < n; x++ ) \
for( b = 0; b < bands; b++, i++ ) \
@ -129,7 +128,7 @@ FUN ## 1_buffer( PEL *p, PEL *q, int n, PEL *vector, IMAGE *im ) \
*/
#define CONSTN_BUFFER( FUN ) \
static void \
FUN ## n_buffer( PEL *p, PEL *q, int n, PEL *vector, IMAGE *im ) \
FUN ## n_buffer( PEL *p, PEL *q, int n, double *tc, IMAGE *im ) \
{ \
const int bands = im->Bands; \
\
@ -220,7 +219,7 @@ im_powtra_vec( IMAGE *in, IMAGE *out, int n, double *c )
return( -1 );
return( im__arith_binary_const( "im_powtra_vec",
in, out, n, c,
in, out, n, c, IM_BANDFMT_DOUBLE,
bandfmt_power,
(im_wrapone_fn) POW1_buffer,
(im_wrapone_fn) POWn_buffer ) );
@ -283,7 +282,7 @@ im_expntra_vec( IMAGE *in, IMAGE *out, int n, double *c )
return( -1 );
return( im__arith_binary_const( "im_expntra_vec",
in, out, n, c,
in, out, n, c, IM_BANDFMT_DOUBLE,
bandfmt_power,
(im_wrapone_fn) POWC1_buffer,
(im_wrapone_fn) POWCn_buffer ) );

View File

@ -319,7 +319,7 @@ int
im_andimage_vec( IMAGE *in, IMAGE *out, int n, double *c )
{
return( im__arith_binary_const( "im_andimage",
in, out, n, c,
in, out, n, c, in->BandFmt,
bandfmt_bool,
(im_wrapone_fn) AND1_buffer,
(im_wrapone_fn) ANDn_buffer ) );
@ -367,7 +367,7 @@ int
im_orimage_vec( IMAGE *in, IMAGE *out, int n, double *c )
{
return( im__arith_binary_const( "im_orimage",
in, out, n, c,
in, out, n, c, in->BandFmt,
bandfmt_bool,
(im_wrapone_fn) OR1_buffer,
(im_wrapone_fn) ORn_buffer ) );
@ -416,7 +416,7 @@ int
im_eorimage_vec( IMAGE *in, IMAGE *out, int n, double *c )
{
return( im__arith_binary_const( "im_eorimage",
in, out, n, c,
in, out, n, c, in->BandFmt,
bandfmt_bool,
(im_wrapone_fn) EOR1_buffer,
(im_wrapone_fn) EORn_buffer ) );
@ -466,7 +466,7 @@ int
im_shiftleft_vec( IMAGE *in, IMAGE *out, int n, double *c )
{
return( im__arith_binary_const( "im_shiftleft",
in, out, n, c,
in, out, n, c, in->BandFmt,
bandfmt_bool,
(im_wrapone_fn) SHIFTL1_buffer,
(im_wrapone_fn) SHIFTLn_buffer ) );
@ -516,7 +516,7 @@ int
im_shiftright_vec( IMAGE *in, IMAGE *out, int n, double *c )
{
return( im__arith_binary_const( "im_shiftright",
in, out, n, c,
in, out, n, c, in->BandFmt,
bandfmt_bool,
(im_wrapone_fn) SHIFTR1_buffer,
(im_wrapone_fn) SHIFTRn_buffer ) );

View File

@ -132,12 +132,15 @@ char *im__gslist_gvalue_get( const GSList *list );
void im__buffer_init( void );
int im__bandup( IMAGE *in, IMAGE *out, int n );
int im__bandalike( IMAGE *in1, IMAGE *in2, IMAGE *out1, IMAGE *out2 );
int im__formatalike( IMAGE *in1, IMAGE *in2, IMAGE *out1, IMAGE *out2 );
int im__arith_binary( const char *name,
IMAGE *in1, IMAGE *in2, IMAGE *out,
int format_table[10],
im_wrapmany_fn fn, void *b );
int im__arith_binary_const( const char *name,
IMAGE *in, IMAGE *out, int n, double *c,
IMAGE *in, IMAGE *out,
int n, double *c, VipsBandFmt vfmt,
int format_table[10],
im_wrapone_fn fn1, im_wrapone_fn fnn );
int im__value( IMAGE *im, double *value );

View File

@ -178,12 +178,12 @@ void im_vwarn( const char *domain, const char *fmt, va_list ap );
void im_diag( const char *domain, const char *fmt, ... )
__attribute__((format(printf, 2, 3)));
int im_bits_of_fmt( int );
const char *im_Type2char( int );
const char *im_BandFmt2char( int );
const char *im_Coding2char( int );
int im_bits_of_fmt( VipsBandFmt fmt );
const char *im_Type2char( VipsType type );
const char *im_BandFmt2char( VipsBandFmt fmt );
const char *im_Coding2char( VipsCoding coding );
const char *im_Compression2char( int );
const char *im_dhint2char( im_demand_type );
const char *im_dhint2char( VipsDemandStyle style );
const char *im_dtype2char( im_desc_type );
int im_char2Type( const char * );
int im_char2BandFmt( const char * );
@ -621,29 +621,6 @@ int im_flood_blob_copy( IMAGE *in, IMAGE *out, int x, int y, PEL *ink );
int im_lineset( IMAGE *in, IMAGE *out, IMAGE *mask, IMAGE *ink,
int n, int *x1v, int *y1v, int *x2v, int *y2v );
/* relational
*/
int im_equal( IMAGE *, IMAGE *, IMAGE * );
int im_equalconst( IMAGE *, IMAGE *, double );
int im_equal_vec( IMAGE *, IMAGE *, int, double * );
int im_notequal( IMAGE *, IMAGE *, IMAGE * );
int im_notequalconst( IMAGE *, IMAGE *, double );
int im_notequal_vec( IMAGE *, IMAGE *, int, double * );
int im_more( IMAGE *, IMAGE *, IMAGE * );
int im_moreconst( IMAGE *, IMAGE *, double );
int im_more_vec( IMAGE *, IMAGE *, int, double * );
int im_less( IMAGE *, IMAGE *, IMAGE * );
int im_lessconst( IMAGE *, IMAGE *, double );
int im_less_vec( IMAGE *, IMAGE *, int, double * );
int im_moreeq( IMAGE *, IMAGE *, IMAGE * );
int im_moreeqconst( IMAGE *, IMAGE *, double );
int im_moreeq_vec( IMAGE *, IMAGE *, int, double * );
int im_lesseq( IMAGE *, IMAGE *, IMAGE * );
int im_lesseqconst( IMAGE *, IMAGE *, double );
int im_lesseq_vec( IMAGE *, IMAGE *, int, double * );
int im_ifthenelse( IMAGE *, IMAGE *, IMAGE *, IMAGE * );
int im_blend( IMAGE *, IMAGE *, IMAGE *, IMAGE * );
/* matrix
*/
DOUBLEMASK *im_mattrn( DOUBLEMASK *, const char * );

View File

@ -138,6 +138,7 @@ typedef struct im__DOUBLEMASK {
#include <vips/proto.h>
#include <vips/arithmetic.h>
#include <vips/boolean.h>
#include <vips/relational.h>
#ifdef IM_ENABLE_DEPRECATED
#include <vips/deprecated.h>

View File

@ -51,14 +51,14 @@ static const int bits[] = {
IM_BBITS_DPCOMPLEX
};
/* Return number of pels bits for band format or -1 on error.
/* Return number of pel bits for band format, or -1 on error.
*/
int
im_bits_of_fmt( int bandfmt )
im_bits_of_fmt( VipsBandFmt fmt )
{
return( bandfmt < 0 || bandfmt > IM_BANDFMT_DPCOMPLEX ?
return( fmt < 0 || fmt > IM_BANDFMT_DPCOMPLEX ?
im_error( "im_bits_of_fmt",
_( "unsupported band format: %d" ), bandfmt ),
_( "unsupported band format: %d" ), fmt ),
-1 :
bits[bandfmt] );
bits[fmt] );
}

View File

@ -218,18 +218,18 @@ char2enum( EnumTable *etable, const char *name )
/* Prettyprint various header fields.
*/
const char *im_Type2char( int n )
{ return( enum2char( &enumType, n ) ); }
const char *im_BandFmt2char( int n )
{ return( enum2char( &enumBandFmt, n ) ); }
const char *im_Coding2char( int n )
{ return( enum2char( &enumCoding, n ) ); }
const char *im_Type2char( VipsType type )
{ return( enum2char( &enumType, type ) ); }
const char *im_BandFmt2char( VipsBandFmt fmt )
{ return( enum2char( &enumBandFmt, fmt ) ); }
const char *im_Coding2char( VipsCoding coding )
{ return( enum2char( &enumCoding, coding ) ); }
const char *im_Compression2char( int n )
{ return( enum2char( &enumCompression, n ) ); }
const char *im_dtype2char( im_desc_type n )
{ return( enum2char( &enumdtype, n ) ); }
const char *im_dhint2char( im_demand_type n )
{ return( enum2char( &enumdhint, n ) ); }
const char *im_dhint2char( VipsDemandStyle style )
{ return( enum2char( &enumdhint, style ) ); }
int im_char2Type( const char *str )
{ return( char2enum( &enumType, str ) ); }

View File

@ -280,57 +280,11 @@ blend_gen( REGION *or, void *seq, void *client1, void *client2 )
return( 0 );
}
/**
* im_blend:
* @c: condition #IMAGE
* @a: then #IMAGE
* @b: else #IMAGE
* @out: output #IMAGE
*
* This operation scans the condition image @c (which must be unsigned char)
* and uses it to blend pixels from either the then image @a or the else
* image @b. 255 means @a only, 0 means @b only, and intermediate values are a
* mixture.
*
* The conditional image @c can have either 1 band, in which case entire pels
* come either from @a or @b, or n bands, where n is the number of bands in
* both @a and @b, in which case individual band elements are chosen from
* @a and @b. Finally, @c may have n bands while @a and @b are single band. In
* this case, @a and @b are copied n times to make n band images and those are
* operated upon.
*
* Images @a and @b must match exactly in size, bands and format.
*
* See also: im_ifthenelse(), im_equal().
*
* Returns: 0 on success, -1 on error
*/
int
im_blend( IMAGE *c, IMAGE *a, IMAGE *b, IMAGE *out )
static int
blend( IMAGE *c, IMAGE *a, IMAGE *b, IMAGE *out )
{
/* If a and b are both LABPACK, repack agan after the blend.
*/
const int repack = a->Coding == IM_CODING_LABQ &&
b->Coding == IM_CODING_LABQ;
IMAGE *t[5];
IMAGE **in;
/* Unpack LABPACK as a courtesy.
*/
if( im_open_local_array( out, t, 5, "im_blend", "p" ) )
return( -1 );
if( a->Coding == IM_CODING_LABQ ) {
if( im_LabQ2Lab( a, t[0] ) )
return( -1 );
a = t[0];
}
if( b->Coding == IM_CODING_LABQ ) {
if( im_LabQ2Lab( b, t[1] ) )
return( -1 );
b = t[1];
}
/* Check args.
*/
if( im_check_uncoded( "im_blend", c ) ||
@ -344,36 +298,88 @@ im_blend( IMAGE *c, IMAGE *a, IMAGE *b, IMAGE *out )
im_pincheck( a ) ||
im_pincheck( b ) )
return( -1 );
if( im_demand_hint( out, IM_THINSTRIP, a, b, c, NULL ) )
return( -1 );
/* Make output image.
*/
if( im_cp_descv( out, a, b, c, NULL ) )
return( -1 );
out->Bands = IM_MAX( c->Bands, a->Bands );
/* Force a/b bands up to the same as out.
*/
if( im_open_local_array( out, t, 2, "im_blend", "p" ) )
if( im_demand_hint( out, IM_THINSTRIP, a, b, c, NULL ) )
return( -1 );
if( im__bandup( a, t[2], out->Bands ) ||
im__bandup( a, t[3], out->Bands ) )
return( -1 );
a = t[2];
b = t[3];
if( !(in = im_allocate_input_array( out, c, a, b, NULL )) ||
im_generate( t[4],
im_generate( out,
im_start_many, blend_gen, im_stop_many, in, NULL ) )
return( -1 );
return( 0 );
}
/**
* im_blend:
* @c: condition #IMAGE
* @a: then #IMAGE
* @b: else #IMAGE
* @out: output #IMAGE
*
* This operation scans the condition image @c (which must be unsigned char)
* and uses it to blend pixels from either the then image @a or the else
* image @b. 255 means @a only, 0 means @b only, and intermediate values are a
* mixture.
*
* Any image can have either 1 band or n bands, where n is the same for all
* the non-1-band images. Single band images are then effectively copied to
* make n-band images.
*
* Images @a and @b are cast up to the smallest common format.
*
* Images @a and @b must match exactly in size.
*
* See also: im_ifthenelse(), im_equal().
*
* Returns: 0 on success, -1 on error
*/
int
im_blend( IMAGE *c, IMAGE *a, IMAGE *b, IMAGE *out )
{
/* If a and b are both LABPACK, repack agan after the blend.
*/
const int repack = a->Coding == IM_CODING_LABQ &&
b->Coding == IM_CODING_LABQ;
IMAGE *t[7];
if( im_open_local_array( out, t, 7, "im_blend", "p" ) )
return( -1 );
/* Unpack LABPACK as a courtesy.
*/
if( a->Coding == IM_CODING_LABQ ) {
if( im_LabQ2Lab( a, t[0] ) )
return( -1 );
a = t[0];
}
if( b->Coding == IM_CODING_LABQ ) {
if( im_LabQ2Lab( b, t[1] ) )
return( -1 );
b = t[1];
}
/* Make a and b match in bands and format.
*/
if( im__formatalike( a, b, t[2], t[3] ) ||
im__bandalike( t[2], t[3], t[4], t[5] ) )
return( -1 );
if( blend( c, t[4], t[5], t[6] ) )
return( -1 );
if( repack ) {
if( im_Lab2LabQ( t[4], out ) )
if( im_Lab2LabQ( t[6], out ) )
return( -1 );
}
else {
if( im_copy( t[4], out ) )
if( im_copy( t[6], out ) )
return( -1 );
}

View File

@ -430,7 +430,7 @@ int
im_equal_vec( IMAGE *in, IMAGE *out, int n, double *c )
{
return( im__arith_binary_const( "im_equal",
in, out, n, c,
in, out, n, c, in->BandFmt,
bandfmt_relational,
(im_wrapone_fn) EQUAL1_buffer,
(im_wrapone_fn) EQUALn_buffer ) );
@ -458,7 +458,7 @@ int
im_notequal_vec( IMAGE *in, IMAGE *out, int n, double *c )
{
return( im__arith_binary_const( "im_notequal",
in, out, n, c,
in, out, n, c, in->BandFmt,
bandfmt_relational,
(im_wrapone_fn) NOTEQUAL1_buffer,
(im_wrapone_fn) NOTEQUALn_buffer ) );
@ -486,7 +486,7 @@ int
im_less_vec( IMAGE *in, IMAGE *out, int n, double *c )
{
return( im__arith_binary_const( "im_less",
in, out, n, c,
in, out, n, c, in->BandFmt,
bandfmt_relational,
(im_wrapone_fn) LESS1_buffer,
(im_wrapone_fn) LESSn_buffer ) );
@ -514,7 +514,7 @@ int
im_lesseq_vec( IMAGE *in, IMAGE *out, int n, double *c )
{
return( im__arith_binary_const( "im_lesseq",
in, out, n, c,
in, out, n, c, in->BandFmt,
bandfmt_relational,
(im_wrapone_fn) LESSEQ1_buffer,
(im_wrapone_fn) LESSEQn_buffer ) );
@ -559,7 +559,7 @@ int
im_more_vec( IMAGE *in, IMAGE *out, int n, double *c )
{
return( im__arith_binary_const( "im_more",
in, out, n, c,
in, out, n, c, in->BandFmt,
bandfmt_relational,
(im_wrapone_fn) MORE1_buffer,
(im_wrapone_fn) MOREn_buffer ) );
@ -605,7 +605,7 @@ int
im_moreeq_vec( IMAGE *in, IMAGE *out, int n, double *c )
{
return( im__arith_binary_const( "im_moreeq",
in, out, n, c,
in, out, n, c, in->BandFmt,
bandfmt_relational,
(im_wrapone_fn) MOREEQ1_buffer,
(im_wrapone_fn) MOREEQn_buffer ) );