Пример #1
0
/* Description of im_disp2Lab.
 */ 
static im_function disp2Lab_desc = {
	"im_disp2Lab", 			/* Name */
	"convert displayable to Lab",	/* Description */
	IM_FN_PIO,			/* Flags */
	disp2Lab_vec, 			/* Dispatch function */
	IM_NUMBER( XYZ2disp_args ), 	/* Size of arg list */
	XYZ2disp_args 			/* Arg list */
};

static im_arg_desc morph_args[] = {
        IM_INPUT_IMAGE( "in" ),
        IM_OUTPUT_IMAGE( "out" ),
	IM_INPUT_DMASK( "greyscale" ),
	IM_INPUT_DOUBLE( "L_offset" ),
	IM_INPUT_DOUBLE( "L_scale" ),
	IM_INPUT_DOUBLE( "a_scale" ),
	IM_INPUT_DOUBLE( "b_scale" )
};

static int
morph_vec( im_object *argv )
{
	im_mask_object *mo = argv[2];
	double L_offset = *((double *) argv[3]);
	double L_scale = *((double *) argv[4]);
	double a_scale = *((double *) argv[5]);
	double b_scale = *((double *) argv[6]);
Пример #2
0
#include <config.h>
#endif /*HAVE_CONFIG_H*/
#include <vips/intl.h>

#include <stdio.h>

#include <vips/vips.h>

#ifdef WITH_DMALLOC
#include <dmalloc.h>
#endif /*WITH_DMALLOC*/

/* One matrix in, one out.
 */
static im_arg_desc one_in_one_out[] = {
	IM_INPUT_DMASK( "in" ),
	IM_OUTPUT_DMASK( "out" )
};

/* Two matricies in, one out.
 */
static im_arg_desc two_in_one_out[] = {
	IM_INPUT_DMASK( "in1" ),
	IM_INPUT_DMASK( "in2" ),
	IM_OUTPUT_DMASK( "out" )
};

/* Call im_matinv via arg vector.
 */
static int
matinv_vec( im_object *argv )
Пример #3
0
};

/* Args for convolver with imask.
 */
static im_arg_desc conv_imask[] = {
	IM_INPUT_IMAGE( "in" ),
	IM_OUTPUT_IMAGE( "out" ),
	IM_INPUT_IMASK( "matrix" )
};

/* Args for convolver with dmask.
 */
static im_arg_desc conv_dmask[] = {
	IM_INPUT_IMAGE( "in" ),
	IM_OUTPUT_IMAGE( "out" ),
	IM_INPUT_DMASK( "matrix" )
};

/* Call im_compass via arg vector.
 */
static int
compass_vec( im_object *argv )
{
	im_mask_object *mo = argv[2];

	return( im_compass( argv[0], argv[1], mo->mask ) );
}

/* Description of im_compass.
 */ 
static im_function compass_desc = {
Пример #4
0
};

/* Args for convolver with imask.
 */
static im_arg_desc conv_imask[] = {
	IM_INPUT_IMAGE( "in" ),
	IM_OUTPUT_IMAGE( "out" ),
	IM_INPUT_IMASK( "matrix" )
};

/* Args for convolver with dmask.
 */
static im_arg_desc conv_dmask[] = {
	IM_INPUT_IMAGE( "in" ),
	IM_OUTPUT_IMAGE( "out" ),
	IM_INPUT_DMASK( "matrix" )
};

/* Call im_compass via arg vector.
 */
static int
compass_vec( im_object *argv )
{
	im_mask_object *mo = argv[2];

	return( im_compass( argv[0], argv[1], mo->mask ) );
}

/* Description of im_compass.
 */ 
static im_function compass_desc = {