oops, dropped im__value()

This commit is contained in:
John Cupitt 2011-11-07 14:21:26 +00:00
parent cb6bd4f85f
commit cb753e16fa
1 changed files with 17 additions and 0 deletions

View File

@ -136,6 +136,23 @@ im__wrapscan( VipsImage *in,
&wrapscan, NULL ) );
}
/* Get the value of pixel (0, 0). Use this to init the min/max value for
* * im_max()/im_stats()/etc.
* */
int
im__value( IMAGE *im, double *value )
{
IMAGE *t;
if( !(t = im_open_local( im, "im__value", "p" )) ||
im_extract_areabands( im, t, 0, 0, 1, 1, 0, 1 ) ||
im_avg( t, value ) )
return( -1 );
return( 0 );
}
/* Track min/max/sum/sum-of-squares for each thread during a scan.
*/
static void *