This commit is contained in:
John Cupitt 2009-11-04 15:04:12 +00:00
parent 271ad96116
commit 64eaeeb6c3
12 changed files with 95 additions and 59 deletions

View File

@ -8,6 +8,7 @@ libdeprecated_la_SOURCES = \
im_cmulnorm.c \
im_printlines.c \
im_convsub.c \
im_line.c \
im_debugim.c \
im_gfadd.c \
im_setbox.c \

View File

@ -687,6 +687,42 @@ static im_function bernd_desc = {
bernd_args /* Arg list */
};
/* Args for im_line.
*/
static im_arg_desc line_args[] = {
IM_RW_IMAGE( "im" ),
IM_INPUT_INT( "x1" ),
IM_INPUT_INT( "y1" ),
IM_INPUT_INT( "x2" ),
IM_INPUT_INT( "y2" ),
IM_INPUT_INT( "pelval" )
};
/* Call im_line via arg vector.
*/
static int
line_vec( im_object *argv )
{
int x1 = *((int *) argv[1]);
int y1 = *((int *) argv[2]);
int x2 = *((int *) argv[3]);
int y2 = *((int *) argv[4]);
int pel = *((int *) argv[5]);
return( im_line( argv[0], x1, y1, x2, y2, pel ) );
}
/* Description of im_line.
*/
static im_function line_desc = {
"im_line", /* Name */
"draw line between points (x1,y1) and (x2,y2)",
0, /* Flags */
line_vec, /* Dispatch function */
IM_NUMBER( line_args ), /* Size of arg list */
line_args /* Arg list */
};
/* Package up all these functions.
*/
static im_function *deprecated_list[] = {
@ -710,6 +746,7 @@ static im_function *deprecated_list[] = {
&print_desc,
&slice_desc,
&bernd_desc,
&line_desc,
&thresh_desc,
&similarity_area_desc,
&similarity_desc

View File

@ -46,6 +46,17 @@
#include <dmalloc.h>
#endif /*WITH_DMALLOC*/
/**
* SECTION: freq_filt
* @short_description: fourier transforms and frequency-domin filters
* @stability: Stable
* @see_also: <link linkend="libvips-image">image</link>
* @include: vips/vips.h
*
* To and from Fourier space, filter in Fourier space, convert Fourier-space
* images to a displayable form.
*/
/* One image in, one out.
*/
static im_arg_desc one_in_one_out[] = {

View File

@ -42,6 +42,15 @@
#include <dmalloc.h>
#endif /*WITH_DMALLOC*/
/**
* SECTION: histograms_lut
* @short_description: find, manipulate and apply histograms and lookup tables
* @stability: Stable
* @see_also: <link linkend="libvips-image">image</link>
* @include: vips/vips.h
*
*/
/* One image in, one out.
*/
static im_arg_desc one_in_one_out[] = {

View File

@ -347,6 +347,8 @@ int im_convsub( IMAGE *in, IMAGE *out, INTMASK *mask, int xskip, int yskip );
int im_bernd( const char *tiffname, int x, int y, int w, int h );
int im_line( IMAGE *, int, int, int, int, int );
#ifdef __cplusplus
}
#endif /*__cplusplus*/

View File

@ -38,12 +38,12 @@ extern "C" {
#endif /*__cplusplus*/
int im_fractsurf( IMAGE *out, int size, double frd );
int im_freqflt( IMAGE *, IMAGE *, IMAGE * );
int im_disp_ps( IMAGE *, IMAGE * );
int im_rotquad( IMAGE *, IMAGE * );
int im_fwfft( IMAGE *, IMAGE * );
int im_invfft( IMAGE *, IMAGE * );
int im_invfftr( IMAGE *, IMAGE * );
int im_freqflt( IMAGE *in, IMAGE *mask, IMAGE *out );
int im_disp_ps( IMAGE *in, IMAGE *out );
int im_rotquad( IMAGE *in, IMAGE *out );
int im_fwfft( IMAGE *in, IMAGE *out );
int im_invfft( IMAGE *in, IMAGE *out );
int im_invfftr( IMAGE *in, IMAGE *out );
int im_phasecor_fft( IMAGE *in1, IMAGE *in2, IMAGE *out );
#ifdef __cplusplus

View File

@ -37,8 +37,8 @@
extern "C" {
#endif /*__cplusplus*/
int im_maplut( IMAGE *, IMAGE *, IMAGE * );
int im_gammacorrect( IMAGE *, IMAGE *, double );
int im_maplut( IMAGE *in, IMAGE *out, IMAGE *lut );
int im_gammacorrect( IMAGE *in, IMAGE *out, double exponent );
int im_heq( IMAGE *in, IMAGE *out, int bandno );
int im_hist( IMAGE *in, IMAGE *out, int bandno );
int im_hist_indexed( IMAGE *index, IMAGE *value, IMAGE *out );
@ -72,7 +72,7 @@ int im_tone_analyse( IMAGE *in, IMAGE *lut,
int im_ismonotonic( IMAGE *lut, int *out );
int im_tone_map( IMAGE *in, IMAGE *out, IMAGE *lut );
int im_project( IMAGE *in, IMAGE *hout, IMAGE *vout );
int im_mpercent( IMAGE *, double, int * );
int im_mpercent( IMAGE *in, double percent, int *out );
#ifdef __cplusplus
}

View File

@ -37,17 +37,19 @@
extern "C" {
#endif /*__cplusplus*/
int im_plotmask( IMAGE *, int, int, PEL *, PEL *, Rect * );
int im_smear( IMAGE *, int, int, Rect * );
int im_smudge( IMAGE *, int, int, Rect * );
int im_paintrect( IMAGE *, Rect *, PEL * );
int im_circle( IMAGE *, int, int, int, int );
int im_insertplace( IMAGE *, IMAGE *, int, int );
int im_line( IMAGE *, int, int, int, int, int );
int im_fastlineuser();
int im_readpoint( IMAGE *, int, int, PEL * );
int im_flood( IMAGE *, int, int, PEL *, Rect * );
int im_flood_blob( IMAGE *, int, int, PEL *, Rect * );
int im_plotmask( IMAGE *im, int ix, int iy, PEL *ink, PEL *mask, Rect *r );
int im_smear( IMAGE *im, int ix, int iy, Rect *r );
int im_smudge( IMAGE *im, int ix, int iy, Rect *r );
int im_paintrect( IMAGE *im, Rect *r, PEL *ink );
int im_circle( IMAGE *im, int cx, int cy, int radius, int intensity );
int im_insertplace( IMAGE *big, IMAGE *small, int x, int y );
int im_fastline( IMAGE *im, int x1, int y1, int x2, int y2, PEL *pel );
int im_fastlineuser( IMAGE *im,
int x1, int y1, int x2, int y2,
int (*fn)(), void *client1, void *client2, void *client3 );
int im_readpoint( IMAGE *im, int x, int y, PEL *pel );
int im_flood( IMAGE *im, int x, int y, PEL *ink, Rect *dout );
int im_flood_blob( IMAGE *im, int x, int y, PEL *ink, Rect *dout );
int im_flood_blob_copy( IMAGE *in, IMAGE *out, int x, int y, PEL *ink );
int im_flood_other( IMAGE *mask, IMAGE *test, int x, int y, int serial );
int im_flood_other_copy( IMAGE *mask, IMAGE *test, IMAGE *out,

View File

@ -5,7 +5,6 @@ libinplace_la_SOURCES = \
im_flood.c \
im_flood_other.c \
im_insertplace.c \
im_line.c \
im_paintrect.c \
im_plotmask.c \
inplace_dispatch.c \

View File

@ -62,7 +62,7 @@
#endif /*WITH_DMALLOC*/
int
im_circle( IMAGE *im, int cx, int cy, int radius, int intensity)
im_circle( IMAGE *im, int cx, int cy, int radius, int intensity )
{
PEL *start;
int size = 0;

View File

@ -42,6 +42,18 @@
#include <dmalloc.h>
#endif /*WITH_DMALLOC*/
/**
* SECTION: inplace
* @short_description: in-place paintbox operations: flood, paste, line,
* circle
* @stability: Stable
* @include: vips/vips.h
*
* These operations modify the input image. You can't easily use them in
* pipelines, but they are useful for paintbox-style programs.
*
*/
/* Args for im_circle.
*/
static im_arg_desc circle_args[] = {
@ -107,42 +119,6 @@ static im_function insertplace_desc = {
insertplace_args /* Arg list */
};
/* Args for im_line.
*/
static im_arg_desc line_args[] = {
IM_RW_IMAGE( "im" ),
IM_INPUT_INT( "x1" ),
IM_INPUT_INT( "y1" ),
IM_INPUT_INT( "x2" ),
IM_INPUT_INT( "y2" ),
IM_INPUT_INT( "pelval" )
};
/* Call im_line via arg vector.
*/
static int
line_vec( im_object *argv )
{
int x1 = *((int *) argv[1]);
int y1 = *((int *) argv[2]);
int x2 = *((int *) argv[3]);
int y2 = *((int *) argv[4]);
int pel = *((int *) argv[5]);
return( im_line( argv[0], x1, y1, x2, y2, pel ) );
}
/* Description of im_line.
*/
static im_function line_desc = {
"im_line", /* Name */
"draw line between points (x1,y1) and (x2,y2)",
0, /* Flags */
line_vec, /* Dispatch function */
IM_NUMBER( line_args ), /* Size of arg list */
line_args /* Arg list */
};
/* Args for im_lineset.
*/
static im_arg_desc lineset_args[] = {
@ -396,7 +372,6 @@ static im_function *inplace_list[] = {
&segment_desc,
&insertplace_desc,
&insertplaceset_desc,
&line_desc,
&lineset_desc
};