This commit is contained in:
John Cupitt 2010-02-11 12:23:15 +00:00
parent 7562b73916
commit 31a8830f46
13 changed files with 168 additions and 177 deletions

View File

@ -15,6 +15,8 @@
- im_ri2c() bandalike
- im_vips2png() saves 16-bit PNGs, if necessary
- vipsthumbnail has selectable interpolators, optional sharpen
- moved a lot of stuff (eg. im_iscomplex()) from deprecated to
almostdeprecated to avoid breakage
15/1/10 started 7.21.1
- added "written" callbacks, used to implement write to non-vips formats
@ -24,7 +26,8 @@
- argh, missing init from colour.c (thanks Peter)
- argh, im_measure() was not looping over bands correctly (thanks Peter)
- removed mmap_limit, we now always use windows ... reduces VM use hugely,
because mmap windows are freed when their regions are freed
because mmap windows are freed when their regions are freed, while images
are only unmapped when they are closed
- have a min bytes for mmap windows as well, so we don't make too many tiny
windows
- im_disp2Lab() was broken

5
TODO
View File

@ -3,11 +3,6 @@
nip2: im_prepare.c:324: im_prepare_to:
Assertion `clipped.left == r->left' failed.
- im_iscomplex() not defined errors from nip2 ... don't we have a compat thing
for this?
IM_DISABLE_DEPRECATED should be off by default
- doing im_create_fmask() and friends
- how about im_invalidate_area()? we currently repaint the whole window on

View File

@ -396,10 +396,10 @@ attach_profile( IMAGE *im, const char *filename )
* profile-connection space with the input profile and then to the output
* space with the output profile.
*
* Use im_icc_import() and im_icc_export() to do either the first or second
* half of this operation in isolation.
* Use im_icc_import() and im_icc_export_depth() to do either the first or
* second half of this operation in isolation.
*
* See also: im_icc_import(), im_icc_export().
* See also: im_icc_import(), im_icc_export_depth().
*
* Returns: 0 on success, -1 on error.
*/

View File

@ -35,7 +35,6 @@
#include <stdio.h>
#include <vips/vips.h>
#include <vips/deprecated.h>
#ifdef WITH_DMALLOC
#include <dmalloc.h>

View File

@ -46,7 +46,6 @@
#include <vips/intl.h>
#include <vips/vips.h>
#include <vips/deprecated.h>
#include <stdio.h>
#include <stdlib.h>

View File

@ -37,7 +37,6 @@ Copyright (C) 1992, Kirk Martinez, History of Art Dept, Birkbeck College
#include <string.h>
#include <vips/vips.h>
#include <vips/deprecated.h>
#ifdef WITH_DMALLOC
#include <dmalloc.h>

View File

@ -56,7 +56,6 @@
#include <assert.h>
#include <vips/vips.h>
#include <vips/deprecated.h>
#ifdef WITH_DMALLOC
#include <dmalloc.h>

View File

@ -57,7 +57,6 @@
#include <math.h>
#include <vips/vips.h>
#include <vips/deprecated.h>
#ifdef WITH_DMALLOC
#include <dmalloc.h>

View File

@ -60,7 +60,6 @@
#include <math.h>
#include <vips/vips.h>
#include <vips/deprecated.h>
#ifdef WITH_DMALLOC
#include <dmalloc.h>

View File

@ -65,7 +65,6 @@
#include <stdlib.h>
#include <vips/vips.h>
#include <vips/deprecated.h>
#ifdef WITH_DMALLOC
#include <dmalloc.h>

View File

@ -35,7 +35,6 @@
#include <vips/intl.h>
#include <vips/vips.h>
#include <vips/deprecated.h>
#include <vips/internal.h>
#ifdef WITH_DMALLOC
@ -222,10 +221,10 @@ im_makerw( IMAGE *im )
int
im_icc_export( IMAGE *in, IMAGE *out,
const char *output_profile_filename, VipsIntent intent )
const char *output_profile_filename, int intent )
{
return( im_icc_export_depth( in, out,
8, output_profile_filename, intent ) );
8, output_profile_filename, (VipsIntent) intent ) );
}
int

View File

@ -1,4 +1,5 @@
/* Old and broken stuff that we still enable by default
/* Old and broken stuff that we still enable by default, but don't document
* and certainly don't recommend.
*
* 30/6/09
* - from vips.h
@ -71,6 +72,163 @@ int im_extract( IMAGE *, IMAGE *, IMAGE_BOX * );
DOUBLEMASK *im_measure( IMAGE *im, IMAGE_BOX *box, int h, int v,
int *sel, int nsel, const char *name );
gboolean im_isuint( IMAGE *im );
gboolean im_isint( IMAGE *im );
gboolean im_isfloat( IMAGE *im );
gboolean im_isscalar( IMAGE *im );
gboolean im_iscomplex( IMAGE *im );
int im_c2ps( IMAGE *in, IMAGE *out );
int im_clip( IMAGE *in, IMAGE *out );
#define MASK_IDEAL_HIGHPASS VIPS_MASK_IDEAL_HIGHPASS
#define MASK_IDEAL_LOWPASS VIPS_MASK_IDEAL_LOWPASS
#define MASK_BUTTERWORTH_HIGHPASS VIPS_MASK_BUTTERWORTH_HIGHPASS
#define MASK_BUTTERWORTH_LOWPASS VIPS_MASK_BUTTERWORTH_LOWPASS
#define MASK_GAUSS_HIGHPASS VIPS_MASK_GAUSS_HIGHPASS
#define MASK_GAUSS_LOWPASS VIPS_MASK_GAUSS_LOWPASS
#define MASK_IDEAL_RINGPASS VIPS_MASK_IDEAL_RINGPASS
#define MASK_IDEAL_RINGREJECT VIPS_MASK_IDEAL_RINGREJECT
#define MASK_BUTTERWORTH_RINGPASS VIPS_MASK_BUTTERWORTH_RINGPASS
#define MASK_BUTTERWORTH_RINGREJECT VIPS_MASK_BUTTERWORTH_RINGREJECT
#define MASK_GAUSS_RINGPASS VIPS_MASK_GAUSS_RINGPASS
#define MASK_GAUSS_RINGREJECT VIPS_MASK_GAUSS_RINGREJECT
#define MASK_IDEAL_BANDPASS VIPS_MASK_IDEAL_BANDPASS
#define MASK_IDEAL_BANDREJECT VIPS_MASK_IDEAL_BANDREJECT
#define MASK_BUTTERWORTH_BANDPASS VIPS_MASK_BUTTERWORTH_BANDPASS
#define MASK_BUTTERWORTH_BANDREJECT VIPS_MASK_BUTTERWORTH_BANDREJECT
#define MASK_GAUSS_BANDPASS VIPS_MASK_GAUSS_BANDPASS
#define MASK_GAUSS_BANDREJECT VIPS_MASK_GAUSS_BANDREJECT
#define MASK_FRACTAL_FLT VIPS_MASK_FRACTAL_FLT
#define MaskType VipsMaskType
/* Copy and swap types.
*/
typedef enum {
IM_ARCH_NATIVE,
IM_ARCH_BYTE_SWAPPED,
IM_ARCH_LSB_FIRST,
IM_ARCH_MSB_FIRST
} im_arch_type;
gboolean im_isnative( im_arch_type arch );
int im_copy_from( IMAGE *in, IMAGE *out, im_arch_type architecture );
/* Backwards compatibility macros.
*/
#define im_clear_error_string() im_error_clear()
#define im_errorstring() im_error_buffer()
/* Deprecated API.
*/
void im_errormsg( const char *fmt, ... )
__attribute__((format(printf, 1, 2)));
void im_verrormsg( const char *fmt, va_list ap );
void im_errormsg_system( int err, const char *fmt, ... )
__attribute__((format(printf, 2, 3)));
void im_diagnostics( const char *fmt, ... )
__attribute__((format(printf, 1, 2)));
void im_warning( const char *fmt, ... )
__attribute__((format(printf, 1, 2)));
/* Deprecated operations.
*/
int im_cmulnorm( IMAGE *in1, IMAGE *in2, IMAGE *out );
int im_fav4( IMAGE **, IMAGE * );
int im_gadd( double, IMAGE *, double, IMAGE *, double, IMAGE *);
int im_litecor( IMAGE *, IMAGE *, IMAGE *, int, double );
int im_render_fade( IMAGE *in, IMAGE *out, IMAGE *mask,
int width, int height, int max,
int fps, int steps,
int priority,
void (*notify)( IMAGE *, Rect *, void * ), void *client );
int im_render( IMAGE *in, IMAGE *out, IMAGE *mask,
int width, int height, int max,
void (*notify)( IMAGE *, Rect *, void * ), void *client );
/* Renamed operations.
*/
/* arithmetic
*/
int im_remainderconst_vec( IMAGE *in, IMAGE *out, int n, double *c );
/* boolean
*/
int im_andconst( IMAGE *, IMAGE *, double );
int im_and_vec( IMAGE *, IMAGE *, int, double * );
int im_orconst( IMAGE *, IMAGE *, double );
int im_or_vec( IMAGE *, IMAGE *, int, double * );
int im_eorconst( IMAGE *, IMAGE *, double );
int im_eor_vec( IMAGE *, IMAGE *, int, double * );
/* mosaicing
*/
int im_affine( IMAGE *in, IMAGE *out,
double a, double b, double c, double d, double dx, double dy,
int ox, int oy, int ow, int oh );
int im_similarity( IMAGE *in, IMAGE *out,
double a, double b, double dx, double dy );
int im_similarity_area( IMAGE *in, IMAGE *out,
double a, double b, double dx, double dy,
int ox, int oy, int ow, int oh );
/* colour
*/
int im_icc_export( IMAGE *in, IMAGE *out,
const char *output_profile_filename, int intent );
/* conversion
*/
int im_clip2dcm( IMAGE *in, IMAGE *out );
int im_clip2cm( IMAGE *in, IMAGE *out );
int im_clip2us( IMAGE *in, IMAGE *out );
int im_clip2ui( IMAGE *in, IMAGE *out );
int im_clip2s( IMAGE *in, IMAGE *out );
int im_clip2i( IMAGE *in, IMAGE *out );
int im_clip2d( IMAGE *in, IMAGE *out );
int im_clip2f( IMAGE *in, IMAGE *out );
int im_clip2c( IMAGE *in, IMAGE *out );
int im_slice( IMAGE *in, IMAGE *out, double, double );
int im_thresh( IMAGE *in, IMAGE *out, double );
int im_print( const char *message );
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_resize_linear( IMAGE *, IMAGE *, int, int );
int im_line( IMAGE *, int, int, int, int, int );
int im_segment( IMAGE *test, IMAGE *mask, int *segments );
int im_convf( IMAGE *in, IMAGE *out, DOUBLEMASK *mask );
int im_convsepf( IMAGE *in, IMAGE *out, DOUBLEMASK *mask );
int im_conv_raw( IMAGE *in, IMAGE *out, INTMASK *mask );
int im_convf_raw( IMAGE *in, IMAGE *out, DOUBLEMASK *mask );
int im_convsep_raw( IMAGE *in, IMAGE *out, INTMASK *mask );
int im_convsepf_raw( IMAGE *in, IMAGE *out, DOUBLEMASK *mask );
int im_fastcor_raw( IMAGE *in, IMAGE *ref, IMAGE *out );
int im_spcor_raw( IMAGE *in, IMAGE *ref, IMAGE *out );
int im_gradcor_raw( IMAGE *in, IMAGE *ref, IMAGE *out );
int im_contrast_surface_raw( IMAGE *in, IMAGE *out,
int half_win_size, int spacing );
int im_stdif_raw( IMAGE *in, IMAGE *out,
double a, double m0, double b, double s0, int xwin, int ywin );
int im_lhisteq_raw( IMAGE *in, IMAGE *out, int xwin, int ywin );
int im_erode_raw( IMAGE *in, IMAGE *out, INTMASK *m );
int im_dilate_raw( IMAGE *in, IMAGE *out, INTMASK *m );
int im_rank_raw( IMAGE *in, IMAGE *out, int xsize, int ysize, int order );
#ifdef __cplusplus
}
#endif /*__cplusplus*/

View File

@ -148,163 +148,6 @@ extern "C" {
#define right(R) IM_RECT_RIGHT(R)
#define bottom(R) IM_RECT_BOTTOM(R)
/* Backwards compatibility macros.
*/
#define im_clear_error_string() im_error_clear()
#define im_errorstring() im_error_buffer()
/* Deprecated API.
*/
void im_errormsg( const char *fmt, ... )
__attribute__((format(printf, 1, 2)));
void im_verrormsg( const char *fmt, va_list ap );
void im_errormsg_system( int err, const char *fmt, ... )
__attribute__((format(printf, 2, 3)));
void im_diagnostics( const char *fmt, ... )
__attribute__((format(printf, 1, 2)));
void im_warning( const char *fmt, ... )
__attribute__((format(printf, 1, 2)));
/* Deprecated operations.
*/
int im_cmulnorm( IMAGE *in1, IMAGE *in2, IMAGE *out );
int im_fav4( IMAGE **, IMAGE * );
int im_gadd( double, IMAGE *, double, IMAGE *, double, IMAGE *);
int im_litecor( IMAGE *, IMAGE *, IMAGE *, int, double );
int im_render_fade( IMAGE *in, IMAGE *out, IMAGE *mask,
int width, int height, int max,
int fps, int steps,
int priority,
void (*notify)( IMAGE *, Rect *, void * ), void *client );
int im_render( IMAGE *in, IMAGE *out, IMAGE *mask,
int width, int height, int max,
void (*notify)( IMAGE *, Rect *, void * ), void *client );
/* Renamed operations.
*/
/* arithmetic
*/
int im_remainderconst_vec( IMAGE *in, IMAGE *out, int n, double *c );
/* boolean
*/
int im_andconst( IMAGE *, IMAGE *, double );
int im_and_vec( IMAGE *, IMAGE *, int, double * );
int im_orconst( IMAGE *, IMAGE *, double );
int im_or_vec( IMAGE *, IMAGE *, int, double * );
int im_eorconst( IMAGE *, IMAGE *, double );
int im_eor_vec( IMAGE *, IMAGE *, int, double * );
/* mosaicing
*/
int im_affine( IMAGE *in, IMAGE *out,
double a, double b, double c, double d, double dx, double dy,
int ox, int oy, int ow, int oh );
int im_similarity( IMAGE *in, IMAGE *out,
double a, double b, double dx, double dy );
int im_similarity_area( IMAGE *in, IMAGE *out,
double a, double b, double dx, double dy,
int ox, int oy, int ow, int oh );
/* colour
*/
int im_icc_export( IMAGE *in, IMAGE *out,
const char *output_profile_filename, VipsIntent intent );
/* conversion
*/
int im_clip2dcm( IMAGE *in, IMAGE *out );
int im_clip2cm( IMAGE *in, IMAGE *out );
int im_clip2us( IMAGE *in, IMAGE *out );
int im_clip2ui( IMAGE *in, IMAGE *out );
int im_clip2s( IMAGE *in, IMAGE *out );
int im_clip2i( IMAGE *in, IMAGE *out );
int im_clip2d( IMAGE *in, IMAGE *out );
int im_clip2f( IMAGE *in, IMAGE *out );
int im_clip2c( IMAGE *in, IMAGE *out );
int im_slice( IMAGE *in, IMAGE *out, double, double );
int im_thresh( IMAGE *in, IMAGE *out, double );
int im_print( const char *message );
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_resize_linear( IMAGE *, IMAGE *, int, int );
int im_line( IMAGE *, int, int, int, int, int );
int im_segment( IMAGE *test, IMAGE *mask, int *segments );
int im_convf( IMAGE *in, IMAGE *out, DOUBLEMASK *mask );
int im_convsepf( IMAGE *in, IMAGE *out, DOUBLEMASK *mask );
int im_conv_raw( IMAGE *in, IMAGE *out, INTMASK *mask );
int im_convf_raw( IMAGE *in, IMAGE *out, DOUBLEMASK *mask );
int im_convsep_raw( IMAGE *in, IMAGE *out, INTMASK *mask );
int im_convsepf_raw( IMAGE *in, IMAGE *out, DOUBLEMASK *mask );
int im_fastcor_raw( IMAGE *in, IMAGE *ref, IMAGE *out );
int im_spcor_raw( IMAGE *in, IMAGE *ref, IMAGE *out );
int im_gradcor_raw( IMAGE *in, IMAGE *ref, IMAGE *out );
int im_contrast_surface_raw( IMAGE *in, IMAGE *out,
int half_win_size, int spacing );
int im_stdif_raw( IMAGE *in, IMAGE *out,
double a, double m0, double b, double s0, int xwin, int ywin );
int im_lhisteq_raw( IMAGE *in, IMAGE *out, int xwin, int ywin );
int im_erode_raw( IMAGE *in, IMAGE *out, INTMASK *m );
int im_dilate_raw( IMAGE *in, IMAGE *out, INTMASK *m );
int im_rank_raw( IMAGE *in, IMAGE *out, int xsize, int ysize, int order );
gboolean im_isuint( IMAGE *im );
gboolean im_isint( IMAGE *im );
gboolean im_isfloat( IMAGE *im );
gboolean im_isscalar( IMAGE *im );
gboolean im_iscomplex( IMAGE *im );
int im_c2ps( IMAGE *in, IMAGE *out );
int im_clip( IMAGE *in, IMAGE *out );
/* Copy and swap types.
*/
typedef enum {
IM_ARCH_NATIVE,
IM_ARCH_BYTE_SWAPPED,
IM_ARCH_LSB_FIRST,
IM_ARCH_MSB_FIRST
} im_arch_type;
gboolean im_isnative( im_arch_type arch );
int im_copy_from( IMAGE *in, IMAGE *out, im_arch_type architecture );
#define MASK_IDEAL_HIGHPASS VIPS_MASK_IDEAL_HIGHPASS
#define MASK_IDEAL_LOWPASS VIPS_MASK_IDEAL_LOWPASS
#define MASK_BUTTERWORTH_HIGHPASS VIPS_MASK_BUTTERWORTH_HIGHPASS
#define MASK_BUTTERWORTH_LOWPASS VIPS_MASK_BUTTERWORTH_LOWPASS
#define MASK_GAUSS_HIGHPASS VIPS_MASK_GAUSS_HIGHPASS
#define MASK_GAUSS_LOWPASS VIPS_MASK_GAUSS_LOWPASS
#define MASK_IDEAL_RINGPASS VIPS_MASK_IDEAL_RINGPASS
#define MASK_IDEAL_RINGREJECT VIPS_MASK_IDEAL_RINGREJECT
#define MASK_BUTTERWORTH_RINGPASS VIPS_MASK_BUTTERWORTH_RINGPASS
#define MASK_BUTTERWORTH_RINGREJECT VIPS_MASK_BUTTERWORTH_RINGREJECT
#define MASK_GAUSS_RINGPASS VIPS_MASK_GAUSS_RINGPASS
#define MASK_GAUSS_RINGREJECT VIPS_MASK_GAUSS_RINGREJECT
#define MASK_IDEAL_BANDPASS VIPS_MASK_IDEAL_BANDPASS
#define MASK_IDEAL_BANDREJECT VIPS_MASK_IDEAL_BANDREJECT
#define MASK_BUTTERWORTH_BANDPASS VIPS_MASK_BUTTERWORTH_BANDPASS
#define MASK_BUTTERWORTH_BANDREJECT VIPS_MASK_BUTTERWORTH_BANDREJECT
#define MASK_GAUSS_BANDPASS VIPS_MASK_GAUSS_BANDPASS
#define MASK_GAUSS_BANDREJECT VIPS_MASK_GAUSS_BANDREJECT
#define MASK_FRACTAL_FLT VIPS_MASK_FRACTAL_FLT
#define MaskType VipsMaskType
#ifdef __cplusplus
}
#endif /*__cplusplus*/