2009-10-11 23:43:22 +02:00
|
|
|
/* Definitions for partial image regions.
|
|
|
|
*
|
|
|
|
* J.Cupitt, 8/4/93
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
This file is part of VIPS.
|
|
|
|
|
|
|
|
VIPS is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Lesser General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef IM_GENERATE_H
|
|
|
|
#define IM_GENERATE_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /*__cplusplus*/
|
|
|
|
|
2011-03-10 10:41:45 +01:00
|
|
|
typedef void *(*im_start_fn)( VipsImage *out, void *a, void *b );
|
2011-03-02 22:53:32 +01:00
|
|
|
typedef int (*im_generate_fn)( VipsRegion *out, void *seq, void *a, void *b );
|
2009-10-11 23:43:22 +02:00
|
|
|
typedef int (*im_stop_fn)( void *seq, void *a, void *b );
|
|
|
|
|
2011-03-10 10:41:45 +01:00
|
|
|
void *im_start_one( VipsImage *out, void *a, void *b );
|
2010-10-22 15:49:36 +02:00
|
|
|
int im_stop_one( void *seq, void *a, void *b );
|
2011-03-10 10:41:45 +01:00
|
|
|
void *im_start_many( VipsImage *out, void *a, void *b );
|
2010-10-22 15:49:36 +02:00
|
|
|
int im_stop_many( void *seq, void *a, void *b );
|
2011-03-10 10:41:45 +01:00
|
|
|
VipsImage **im_allocate_input_array( VipsImage *out, ... )
|
2009-10-11 23:43:22 +02:00
|
|
|
__attribute__((sentinel));
|
|
|
|
|
2011-03-10 10:41:45 +01:00
|
|
|
int im_generate( VipsImage *im,
|
2009-10-11 23:43:22 +02:00
|
|
|
im_start_fn start, im_generate_fn generate, im_stop_fn stop,
|
|
|
|
void *a, void *b
|
|
|
|
);
|
2011-03-10 10:41:45 +01:00
|
|
|
int im_iterate( VipsImage *im,
|
2009-10-11 23:43:22 +02:00
|
|
|
im_start_fn start, im_generate_fn generate, im_stop_fn stop,
|
|
|
|
void *a, void *b
|
|
|
|
);
|
|
|
|
|
2011-03-24 18:03:27 +01:00
|
|
|
int vips_demand_hint_array( VipsImage *image,
|
|
|
|
VipsDemandStyle hint, VipsImage **in );
|
|
|
|
int vips_demand_hint( VipsImage *image, VipsDemandStyle hint, ... )
|
2009-10-11 23:43:22 +02:00
|
|
|
__attribute__((sentinel));
|
|
|
|
|
|
|
|
/* Buffer processing.
|
|
|
|
*/
|
|
|
|
typedef void (*im_wrapone_fn)( void *in, void *out, int width,
|
|
|
|
void *a, void *b );
|
2011-03-10 10:41:45 +01:00
|
|
|
int im_wrapone( VipsImage *in, VipsImage *out,
|
2009-10-11 23:43:22 +02:00
|
|
|
im_wrapone_fn fn, void *a, void *b );
|
|
|
|
|
|
|
|
typedef void (*im_wraptwo_fn)( void *in1, void *in2, void *out,
|
|
|
|
int width, void *a, void *b );
|
2011-03-10 10:41:45 +01:00
|
|
|
int im_wraptwo( VipsImage *in1, VipsImage *in2, VipsImage *out,
|
2009-10-11 23:43:22 +02:00
|
|
|
im_wraptwo_fn fn, void *a, void *b );
|
|
|
|
|
|
|
|
typedef void (*im_wrapmany_fn)( void **in, void *out, int width,
|
|
|
|
void *a, void *b );
|
2011-03-10 10:41:45 +01:00
|
|
|
int im_wrapmany( VipsImage **in, VipsImage *out,
|
2009-10-11 23:43:22 +02:00
|
|
|
im_wrapmany_fn fn, void *a, void *b );
|
|
|
|
|
2009-10-12 17:27:18 +02:00
|
|
|
/* Async rendering.
|
|
|
|
*/
|
2011-03-10 10:41:45 +01:00
|
|
|
int im_render_priority( VipsImage *in, VipsImage *out, VipsImage *mask,
|
2009-10-12 17:27:18 +02:00
|
|
|
int width, int height, int max,
|
|
|
|
int priority,
|
2011-03-17 14:05:46 +01:00
|
|
|
void (*notify)( VipsImage *, VipsRect *, void * ), void *client );
|
2011-03-10 10:41:45 +01:00
|
|
|
int im_cache( VipsImage *in, VipsImage *out, int width, int height, int max );
|
2009-10-12 17:27:18 +02:00
|
|
|
|
2011-03-10 10:41:45 +01:00
|
|
|
int im_setupout( VipsImage *im );
|
2009-10-22 14:02:27 +02:00
|
|
|
|
2009-10-11 23:43:22 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /*__cplusplus*/
|
|
|
|
|
|
|
|
#endif /*IM_GENERATE_H*/
|