Ejemplo n.º 1
0
static int
thumbnail_process( VipsObject *process, const char *filename )
{
	VipsImage *in;
	VipsImage *thumbnail;
	VipsImage *crop;
	VipsImage *rotate;

	if( !(in = thumbnail_open( process, filename )) ||
		!(thumbnail = thumbnail_shrink( process, in )) ||
		!(crop = thumbnail_crop( process, thumbnail )) ||
		!(rotate = thumbnail_rotate( process, crop )) ||
		thumbnail_write( process, rotate, filename ) )
		return( -1 );

	return( 0 );
}
Ejemplo n.º 2
0
static int
thumbnail_process( VipsObject *process, const char *filename )
{
	VipsImage *in;
	VipsInterpolate *interp;
	VipsImage *sharpen;
	VipsImage *thumbnail;
	VipsImage *crop;

	if( !(in = thumbnail_open( process, filename )) ||
		!(interp = thumbnail_interpolator( process, in )) ||
		!(sharpen = thumbnail_sharpen( process )) ||
		!(thumbnail = 
			thumbnail_shrink( process, in, interp, sharpen )) ||
		!(crop = thumbnail_crop( process, thumbnail )) ||
		thumbnail_write( crop, filename ) )
		return( -1 );

	return( 0 );
}