added deprecated package
This commit is contained in:
parent
72e9094048
commit
e443f53b97
|
@ -25,6 +25,7 @@
|
||||||
im_multiply(), im_divide(), im_remainder()
|
im_multiply(), im_divide(), im_remainder()
|
||||||
- im_remainder() has a float result for float types
|
- im_remainder() has a float result for float types
|
||||||
- im_measure() allows sel == NULL, meaning all patches
|
- im_measure() allows sel == NULL, meaning all patches
|
||||||
|
- added "deprecated" package
|
||||||
|
|
||||||
25/3/09 started 7.18.0
|
25/3/09 started 7.18.0
|
||||||
- revised version numbers
|
- revised version numbers
|
||||||
|
|
|
@ -509,6 +509,7 @@ AC_OUTPUT([
|
||||||
libvips/colour/Makefile
|
libvips/colour/Makefile
|
||||||
libvips/conversion/Makefile
|
libvips/conversion/Makefile
|
||||||
libvips/convolution/Makefile
|
libvips/convolution/Makefile
|
||||||
|
libvips/deprecated/Makefile
|
||||||
libvips/format/Makefile
|
libvips/format/Makefile
|
||||||
libvips/freq_filt/Makefile
|
libvips/freq_filt/Makefile
|
||||||
libvips/histograms_lut/Makefile
|
libvips/histograms_lut/Makefile
|
||||||
|
|
|
@ -17,6 +17,7 @@ SUBDIRS = \
|
||||||
boolean \
|
boolean \
|
||||||
colour \
|
colour \
|
||||||
conversion \
|
conversion \
|
||||||
|
deprecated \
|
||||||
convolution \
|
convolution \
|
||||||
$(C_COMPILE_DIR) \
|
$(C_COMPILE_DIR) \
|
||||||
format \
|
format \
|
||||||
|
@ -45,6 +46,7 @@ libvips_la_LIBADD = \
|
||||||
colour/libcolour.la \
|
colour/libcolour.la \
|
||||||
conversion/libconversion.la \
|
conversion/libconversion.la \
|
||||||
convolution/libconvolution.la \
|
convolution/libconvolution.la \
|
||||||
|
deprecated/libdeprecated.la \
|
||||||
$(C_LIB) \
|
$(C_LIB) \
|
||||||
format/libformat.la \
|
format/libformat.la \
|
||||||
freq_filt/libfreq_filt.la \
|
freq_filt/libfreq_filt.la \
|
||||||
|
|
|
@ -7,7 +7,6 @@ libarithmetic_la_SOURCES = \
|
||||||
im_avg.c \
|
im_avg.c \
|
||||||
im_point_bilinear.c \
|
im_point_bilinear.c \
|
||||||
im_bandmean.c \
|
im_bandmean.c \
|
||||||
im_cmulnorm.c \
|
|
||||||
im_costra.c \
|
im_costra.c \
|
||||||
im_cross_phase.c \
|
im_cross_phase.c \
|
||||||
im_deviate.c \
|
im_deviate.c \
|
||||||
|
@ -15,14 +14,9 @@ libarithmetic_la_SOURCES = \
|
||||||
im_ceil.c \
|
im_ceil.c \
|
||||||
im_floor.c \
|
im_floor.c \
|
||||||
im_expntra.c \
|
im_expntra.c \
|
||||||
im_fav4.c \
|
|
||||||
im_gadd.c \
|
|
||||||
im_gaddim.c \
|
|
||||||
im_gfadd.c \
|
|
||||||
im_invert.c \
|
im_invert.c \
|
||||||
im_linreg.c \
|
im_linreg.c \
|
||||||
im_lintra.c \
|
im_lintra.c \
|
||||||
im_litecor.c \
|
|
||||||
im_log10tra.c \
|
im_log10tra.c \
|
||||||
im_logtra.c \
|
im_logtra.c \
|
||||||
im_max.c \
|
im_max.c \
|
||||||
|
|
|
@ -347,25 +347,6 @@ static im_function point_bilinear_desc = {
|
||||||
point_bilinear_args
|
point_bilinear_args
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Call im_cmulnorm via arg vector.
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
cmulnorm_vec( im_object *argv )
|
|
||||||
{
|
|
||||||
return( im_cmulnorm( argv[0], argv[1], argv[2] ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Description of im_cmulnorm.
|
|
||||||
*/
|
|
||||||
static im_function cmulnorm_desc = {
|
|
||||||
"im_cmulnorm", /* Name */
|
|
||||||
N_( "multiply two complex images, normalising output" ),
|
|
||||||
IM_FN_PIO, /* Flags */
|
|
||||||
cmulnorm_vec, /* Dispatch function */
|
|
||||||
IM_NUMBER( two_in_one_out ), /* Size of arg list */
|
|
||||||
two_in_one_out /* Arg list */
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Call im_deviate via arg vector.
|
/* Call im_deviate via arg vector.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
|
@ -487,42 +468,6 @@ static im_function expntra_vec_desc = {
|
||||||
expntra_vec_args /* Arg list */
|
expntra_vec_args /* Arg list */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Four images in, one out.
|
|
||||||
*/
|
|
||||||
static im_arg_desc fav4_args[] = {
|
|
||||||
IM_INPUT_IMAGE( "in1" ),
|
|
||||||
IM_INPUT_IMAGE( "in2" ),
|
|
||||||
IM_INPUT_IMAGE( "in3" ),
|
|
||||||
IM_INPUT_IMAGE( "in4" ),
|
|
||||||
IM_OUTPUT_IMAGE( "out" )
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Call im_fav4 via arg vector.
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
fav4_vec( im_object *argv )
|
|
||||||
{
|
|
||||||
IMAGE *buf[4];
|
|
||||||
|
|
||||||
buf[0] = argv[0];
|
|
||||||
buf[1] = argv[1];
|
|
||||||
buf[2] = argv[2];
|
|
||||||
buf[3] = argv[3];
|
|
||||||
|
|
||||||
return( im_fav4( &buf[0], argv[4] ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Description of im_fav4.
|
|
||||||
*/
|
|
||||||
static im_function fav4_desc = {
|
|
||||||
"im_fav4", /* Name */
|
|
||||||
N_( "average of 4 images" ),
|
|
||||||
0, /* Flags */
|
|
||||||
fav4_vec, /* Dispatch function */
|
|
||||||
IM_NUMBER( fav4_args ), /* Size of arg list */
|
|
||||||
fav4_args /* Arg list */
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Call im_divide via arg vector.
|
/* Call im_divide via arg vector.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
|
@ -542,40 +487,6 @@ static im_function divide_desc = {
|
||||||
two_in_one_out /* Arg list */
|
two_in_one_out /* Arg list */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Args for im_gadd().
|
|
||||||
*/
|
|
||||||
static im_arg_desc gadd_args[] = {
|
|
||||||
IM_INPUT_DOUBLE( "a" ),
|
|
||||||
IM_INPUT_IMAGE( "in1" ),
|
|
||||||
IM_INPUT_DOUBLE( "b" ),
|
|
||||||
IM_INPUT_IMAGE( "in2" ),
|
|
||||||
IM_INPUT_DOUBLE( "c" ),
|
|
||||||
IM_OUTPUT_IMAGE( "out" )
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Call im_gadd() via arg vector.
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
gadd_vec( im_object *argv )
|
|
||||||
{
|
|
||||||
double a = *((double *) argv[0]);
|
|
||||||
double b = *((double *) argv[2]);
|
|
||||||
double c = *((double *) argv[4]);
|
|
||||||
|
|
||||||
return( im_gadd( a, argv[1], b, argv[3], c, argv[5] ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Description of im_gadd().
|
|
||||||
*/
|
|
||||||
static im_function gadd_desc = {
|
|
||||||
"im_gadd", /* Name */
|
|
||||||
N_( "calculate a*in1 + b*in2 + c = outfile" ),
|
|
||||||
0, /* Flags */
|
|
||||||
gadd_vec, /* Dispatch function */
|
|
||||||
IM_NUMBER( gadd_args ), /* Size of arg list */
|
|
||||||
gadd_args /* Arg list */
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Call im_invert via arg vector.
|
/* Call im_invert via arg vector.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
|
@ -663,38 +574,6 @@ static im_function lintra_vec_desc = {
|
||||||
lintra_vec_args /* Arg list */
|
lintra_vec_args /* Arg list */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Args for im_litecor().
|
|
||||||
*/
|
|
||||||
static im_arg_desc litecor_args[] = {
|
|
||||||
IM_INPUT_IMAGE( "in" ),
|
|
||||||
IM_INPUT_IMAGE( "white" ),
|
|
||||||
IM_OUTPUT_IMAGE( "out" ),
|
|
||||||
IM_INPUT_INT( "clip" ),
|
|
||||||
IM_INPUT_DOUBLE( "factor" )
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Call im_litecor() via arg vector.
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
litecor_vec( im_object *argv )
|
|
||||||
{
|
|
||||||
int clip = *((int *) argv[3]);
|
|
||||||
double factor = *((double *) argv[4]);
|
|
||||||
|
|
||||||
return( im_litecor( argv[0], argv[1], argv[2], clip, factor ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Description of im_litecor().
|
|
||||||
*/
|
|
||||||
static im_function litecor_desc = {
|
|
||||||
"im_litecor", /* Name */
|
|
||||||
N_( "calculate max(white)*factor*(in/white), if clip == 1" ),
|
|
||||||
0, /* Flags */
|
|
||||||
litecor_vec, /* Dispatch function */
|
|
||||||
IM_NUMBER( litecor_args ), /* Size of arg list */
|
|
||||||
litecor_args /* Arg list */
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Call im_log10tra via arg vector.
|
/* Call im_log10tra via arg vector.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
|
@ -1479,7 +1358,6 @@ static im_function *arith_list[] = {
|
||||||
&point_bilinear_desc,
|
&point_bilinear_desc,
|
||||||
&bandmean_desc,
|
&bandmean_desc,
|
||||||
&ceil_desc,
|
&ceil_desc,
|
||||||
&cmulnorm_desc,
|
|
||||||
&costra_desc,
|
&costra_desc,
|
||||||
&cross_phase_desc,
|
&cross_phase_desc,
|
||||||
&deviate_desc,
|
&deviate_desc,
|
||||||
|
@ -1488,14 +1366,11 @@ static im_function *arith_list[] = {
|
||||||
&expntra_desc,
|
&expntra_desc,
|
||||||
&expntra_vec_desc,
|
&expntra_vec_desc,
|
||||||
&exptra_desc,
|
&exptra_desc,
|
||||||
&fav4_desc,
|
|
||||||
&floor_desc,
|
&floor_desc,
|
||||||
&gadd_desc,
|
|
||||||
&invert_desc,
|
&invert_desc,
|
||||||
&lintra_desc,
|
&lintra_desc,
|
||||||
&linreg_desc,
|
&linreg_desc,
|
||||||
&lintra_vec_desc,
|
&lintra_vec_desc,
|
||||||
&litecor_desc,
|
|
||||||
&log10tra_desc,
|
&log10tra_desc,
|
||||||
&logtra_desc,
|
&logtra_desc,
|
||||||
&max_desc,
|
&max_desc,
|
||||||
|
|
|
@ -90,7 +90,7 @@ floor_gen( PEL *in, PEL *out, int width, IMAGE *im )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert( 0 );
|
g_assert( 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
noinst_LTLIBRARIES = libdeprecated.la
|
||||||
|
|
||||||
|
libdeprecated_la_SOURCES = \
|
||||||
|
deprecated_dispatch.c \
|
||||||
|
im_fav4.c \
|
||||||
|
im_gadd.c \
|
||||||
|
im_gaddim.c \
|
||||||
|
im_cmulnorm.c \
|
||||||
|
im_gfadd.c \
|
||||||
|
im_litecor.c
|
||||||
|
|
||||||
|
INCLUDES = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@
|
|
@ -0,0 +1,199 @@
|
||||||
|
/* Function dispatch tables for deprecated operations.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#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*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SECTION: deprecated
|
||||||
|
* @short_description: various deprecated operations which remain for
|
||||||
|
* compatibility
|
||||||
|
*
|
||||||
|
* @stability: Stable
|
||||||
|
* @include: vips/vips.h
|
||||||
|
*
|
||||||
|
* These operations are left-overs from earlier versions of VIPS which are
|
||||||
|
* kept for compatibility.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Two images in, one out.
|
||||||
|
*/
|
||||||
|
static im_arg_desc two_in_one_out[] = {
|
||||||
|
IM_INPUT_IMAGE( "in1" ),
|
||||||
|
IM_INPUT_IMAGE( "in2" ),
|
||||||
|
IM_OUTPUT_IMAGE( "out" )
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Call im_cmulnorm via arg vector.
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
cmulnorm_vec( im_object *argv )
|
||||||
|
{
|
||||||
|
return( im_cmulnorm( argv[0], argv[1], argv[2] ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Description of im_cmulnorm.
|
||||||
|
*/
|
||||||
|
static im_function cmulnorm_desc = {
|
||||||
|
"im_cmulnorm", /* Name */
|
||||||
|
N_( "multiply two complex images, normalising output" ),
|
||||||
|
IM_FN_PIO, /* Flags */
|
||||||
|
cmulnorm_vec, /* Dispatch function */
|
||||||
|
IM_NUMBER( two_in_one_out ), /* Size of arg list */
|
||||||
|
two_in_one_out /* Arg list */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Four images in, one out.
|
||||||
|
*/
|
||||||
|
static im_arg_desc fav4_args[] = {
|
||||||
|
IM_INPUT_IMAGE( "in1" ),
|
||||||
|
IM_INPUT_IMAGE( "in2" ),
|
||||||
|
IM_INPUT_IMAGE( "in3" ),
|
||||||
|
IM_INPUT_IMAGE( "in4" ),
|
||||||
|
IM_OUTPUT_IMAGE( "out" )
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Call im_fav4 via arg vector.
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
fav4_vec( im_object *argv )
|
||||||
|
{
|
||||||
|
IMAGE *buf[4];
|
||||||
|
|
||||||
|
buf[0] = argv[0];
|
||||||
|
buf[1] = argv[1];
|
||||||
|
buf[2] = argv[2];
|
||||||
|
buf[3] = argv[3];
|
||||||
|
|
||||||
|
return( im_fav4( &buf[0], argv[4] ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Description of im_fav4.
|
||||||
|
*/
|
||||||
|
static im_function fav4_desc = {
|
||||||
|
"im_fav4", /* Name */
|
||||||
|
N_( "average of 4 images" ),
|
||||||
|
0, /* Flags */
|
||||||
|
fav4_vec, /* Dispatch function */
|
||||||
|
IM_NUMBER( fav4_args ), /* Size of arg list */
|
||||||
|
fav4_args /* Arg list */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Args for im_gadd().
|
||||||
|
*/
|
||||||
|
static im_arg_desc gadd_args[] = {
|
||||||
|
IM_INPUT_DOUBLE( "a" ),
|
||||||
|
IM_INPUT_IMAGE( "in1" ),
|
||||||
|
IM_INPUT_DOUBLE( "b" ),
|
||||||
|
IM_INPUT_IMAGE( "in2" ),
|
||||||
|
IM_INPUT_DOUBLE( "c" ),
|
||||||
|
IM_OUTPUT_IMAGE( "out" )
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Call im_gadd() via arg vector.
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
gadd_vec( im_object *argv )
|
||||||
|
{
|
||||||
|
double a = *((double *) argv[0]);
|
||||||
|
double b = *((double *) argv[2]);
|
||||||
|
double c = *((double *) argv[4]);
|
||||||
|
|
||||||
|
return( im_gadd( a, argv[1], b, argv[3], c, argv[5] ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Description of im_gadd().
|
||||||
|
*/
|
||||||
|
static im_function gadd_desc = {
|
||||||
|
"im_gadd", /* Name */
|
||||||
|
N_( "calculate a*in1 + b*in2 + c = outfile" ),
|
||||||
|
0, /* Flags */
|
||||||
|
gadd_vec, /* Dispatch function */
|
||||||
|
IM_NUMBER( gadd_args ), /* Size of arg list */
|
||||||
|
gadd_args /* Arg list */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Args for im_litecor().
|
||||||
|
*/
|
||||||
|
static im_arg_desc litecor_args[] = {
|
||||||
|
IM_INPUT_IMAGE( "in" ),
|
||||||
|
IM_INPUT_IMAGE( "white" ),
|
||||||
|
IM_OUTPUT_IMAGE( "out" ),
|
||||||
|
IM_INPUT_INT( "clip" ),
|
||||||
|
IM_INPUT_DOUBLE( "factor" )
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Call im_litecor() via arg vector.
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
litecor_vec( im_object *argv )
|
||||||
|
{
|
||||||
|
int clip = *((int *) argv[3]);
|
||||||
|
double factor = *((double *) argv[4]);
|
||||||
|
|
||||||
|
return( im_litecor( argv[0], argv[1], argv[2], clip, factor ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Description of im_litecor().
|
||||||
|
*/
|
||||||
|
static im_function litecor_desc = {
|
||||||
|
"im_litecor", /* Name */
|
||||||
|
N_( "calculate max(white)*factor*(in/white), if clip == 1" ),
|
||||||
|
0, /* Flags */
|
||||||
|
litecor_vec, /* Dispatch function */
|
||||||
|
IM_NUMBER( litecor_args ), /* Size of arg list */
|
||||||
|
litecor_args /* Arg list */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Package up all these functions.
|
||||||
|
*/
|
||||||
|
static im_function *deprecated_list[] = {
|
||||||
|
&cmulnorm_desc,
|
||||||
|
&fav4_desc,
|
||||||
|
&gadd_desc,
|
||||||
|
&litecor_desc
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Package of functions.
|
||||||
|
*/
|
||||||
|
im_package im__deprecated = {
|
||||||
|
"deprecated",
|
||||||
|
IM_NUMBER( deprecated_list ),
|
||||||
|
deprecated_list
|
||||||
|
};
|
|
@ -66,6 +66,7 @@ extern im_package im__boolean;
|
||||||
extern im_package im__colour;
|
extern im_package im__colour;
|
||||||
extern im_package im__conversion;
|
extern im_package im__conversion;
|
||||||
extern im_package im__convolution;
|
extern im_package im__convolution;
|
||||||
|
extern im_package im__deprecated;
|
||||||
extern im_package im__format;
|
extern im_package im__format;
|
||||||
extern im_package im__freq_filt;
|
extern im_package im__freq_filt;
|
||||||
extern im_package im__histograms_lut;
|
extern im_package im__histograms_lut;
|
||||||
|
@ -450,6 +451,7 @@ static im_package *built_in[] = {
|
||||||
&im__colour,
|
&im__colour,
|
||||||
&im__conversion,
|
&im__conversion,
|
||||||
&im__convolution,
|
&im__convolution,
|
||||||
|
&im__deprecated,
|
||||||
&im__format,
|
&im__format,
|
||||||
&im__freq_filt,
|
&im__freq_filt,
|
||||||
&im__histograms_lut,
|
&im__histograms_lut,
|
||||||
|
|
|
@ -409,7 +409,7 @@ im_check_complex( const char *domain, IMAGE *im )
|
||||||
int
|
int
|
||||||
im_check_uchar( const char *domain, IMAGE *im )
|
im_check_uchar( const char *domain, IMAGE *im )
|
||||||
{
|
{
|
||||||
if( im->BandFmt != IM_FORMAT_UCHAR ) {
|
if( im->BandFmt != IM_BANDFMT_UCHAR ) {
|
||||||
im_error( domain, "%s", _( "image must be uchar" ) );
|
im_error( domain, "%s", _( "image must be uchar" ) );
|
||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue