This commit is contained in:
John Cupitt 2009-08-17 08:28:47 +00:00
parent 81df98e88f
commit 4d204a3062
36 changed files with 1 additions and 5961 deletions

8
TODO
View File

@ -34,9 +34,8 @@
>
> pngcrush -c 0 -bit_depth 1 *.png
- COPYInG file should be lgpl2.1+? seems to be plain 2.1 atm
- need a separate section in ref docs for vips, vipsCC (and python?)
- need a separate sectrion in ref docs for vips, vipsCC (and python?)
- try the new liboil thing:
@ -62,11 +61,6 @@
T1 op T1 -> T2
- split proto.h into headers for arithmetic etc.
- move headers into libsrc/arithmetic, can we get them installed into the

View File

@ -1,2 +0,0 @@
SUBDIRS = vips

View File

@ -1,36 +0,0 @@
pkginclude_HEADERS = \
VDisplay.h \
VError.h \
VImage.h \
VMask.h \
vipscpp.h \
colour.h \
debug.h \
dispatch.h \
format.h \
fmask.h \
mosaic.h \
interpolate.h \
object.h \
proto.h \
rect.h \
region.h \
r_access.h \
struct.h \
semaphore.h \
transform.h \
threadgroup.h \
thread.h \
util.h \
meta.h \
version.h \
vips.h \
vips \
intl.h \
buf.h \
vipsc++.h
vipsc++.h:
vips --cpph all > vipsc++.h
EXTRA_DIST = version.h.in internal.h

View File

@ -1,113 +0,0 @@
/* VIPS display class.
*
* Hide details of im_col_display API.
*/
/*
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_VDISPLAY_H
#define IM_VDISPLAY_H
/* SWIG includes this file directly rather than going through vipscpp.h ... so
* we have to define these macros here as well.
*/
#ifdef SWIG
#define VIPS_NAMESPACE_START namespace vips {
#define VIPS_NAMESPACE_END }
#endif /*SWIG*/
/* Wrap pointers to these, but we don't want to import all the old C API. Just
* declare them.
*/
extern "C" {
struct im_col_display;
struct im_col_tab_disp;
}
VIPS_NAMESPACE_START
// Wrapper over im_col_display with ref counting
class VDisplay {
struct refblock {
im_col_display *disp; // im_col_display struct
im_col_tab_disp *luts; // luts built from this display
int priv; // disp is ours, or system
int nrefs; // Refs to us
// Invalidate lut
void cleanlut();
// Break attached stuff
void cleanref();
// Get ready to write
void wready() throw( VError );
// Check that luts are up-to-date
void cluts() throw( VError );
refblock() : disp(0), luts(0), priv(0), nrefs(1) {}
~refblock() { cleanref(); }
};
refblock *ref;
public:
enum VDisplayType {
BARCO, // Does many corrections for us
DUMB // Needs many corrections
};
// Get named display
VDisplay( const char *name ) throw( VError );
// Get default display
VDisplay();
// Copy constructor
VDisplay( const VDisplay &a ) { ref = a.ref; ref->nrefs++; }
// Assignment
VDisplay &operator=( const VDisplay &a );
// Destructor
virtual ~VDisplay();
// The matrix type we use
typedef float matrix[3][3];
// Extract display pointer
void *disp() const { return( ref->disp ); }
// Extract luts pointer, rebuilding luts if necessary
im_col_tab_disp *luts() const throw( VError )
{ ref->cluts(); return( ref->luts ); }
};
VIPS_NAMESPACE_END
#endif /*IM_VDISPLAY_H*/

View File

@ -1,82 +0,0 @@
// Header for error type
/*
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_VERROR_H
#define IM_VERROR_H
/* SWIG includes this file directly rather than going through vipscpp.h ... so
* we have to define these macros here as well.
*/
#ifdef SWIG
#define VIPS_NAMESPACE_START namespace vips {
#define VIPS_NAMESPACE_END }
#endif /*SWIG*/
/* Don't include these when parsing for SWIG.
*/
#ifndef SWIG
# include <string>
# include <iosfwd>
# include <exception>
#endif /*!SWIG*/
VIPS_NAMESPACE_START
// Error type
class VError : public std::exception {
std::string _what;
public:
VError( std::string what ) : _what( what ) {}
VError() {}
virtual ~VError() throw() {}
// Print message and exit
void perror( const char * );
void perror();
// Append some more text to the message
VError &app( std::string txt );
VError &app( const int i );
// Extract string
virtual const char *what() const throw() { return _what.c_str(); }
void ostream_print( std::ostream & ) const;
};
inline std::ostream &operator<<( std::ostream &file, const VError &err )
{
err.ostream_print( file );
return( file );
}
void verror( std::string str = "" ) throw( VError );
VIPS_NAMESPACE_END
#endif /*IM_VERROR_H*/

View File

@ -1,447 +0,0 @@
// VIPS image wrapper
/*
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_VIMAGE_H
#define IM_VIMAGE_H
/* SWIG includes this file directly rather than going through vipscpp.h ... so
* we have to define these macros here as well.
*/
#ifdef SWIG
# define VIPS_NAMESPACE_START namespace vips {
# define VIPS_NAMESPACE_END }
#endif /*SWIG*/
/* Don't include these when parsing for SWIG.
*/
#ifndef SWIG
# include <list>
# include <complex>
# include <vector>
#endif /*!SWIG*/
/* Wrap pointers to these, but we don't want to import all the old C API. Just
* declare them.
*/
extern "C" {
struct im__IMAGE;
/* Needed by Vargv, see below.
*/
struct im__function;
typedef void *im__object;
}
VIPS_NAMESPACE_START
/* A VIPS callback, our name for im_callback_fn.
*/
typedef int (*VCallback)( void *, void * );
/* VIPS image class.
*
* Slightly tricky: we have two sorts of sharing. Several VImage can share one
* refblock (while results are being returned from functions, for example),
* and several other refblocks can have IMAGEs which depend upon this IMAGE
* for their result.
*/
class VImage {
/* We'd like this to be protected so that user subclasses can define
* their own member wrappers. But sadly C++ doesn't work like that:
* subclasses of VImage can only refer to protected members via
* this->, which isn't what we need. Just make it public and hope no
* one touches it.
*/
public:
/* Doesn't need to be wrapped.
*/
#ifndef SWIG
// Count ref etc. in one of these. One for each open VIPS image.
struct refblock {
im__IMAGE *im; // IMAGE pointer
int close_on_delete; // Set if we must im_close()
int nrefs; // Number of refs to us
std::list<refblock*> orefs; // Refs im makes
// Construct/destruct
refblock();
virtual ~refblock() throw( VError );
// Add a ref - this (output image) depends upon IMAGE in
void addref( refblock *in ) throw( VError );
// Remove a ref
void removeref() throw( VError );
// Debugging
void debug_print();
// Linked list needs "==" -- use address equivalence
friend int operator==( const refblock &left,
const refblock &right ) { return( &left == &right ); }
};
refblock *_ref;
#endif /*!SWIG*/
public:
#ifdef DEBUG
/* All the refblocks in the world.
*/
static std::list<refblock*> all_refblock;
#endif /*DEBUG*/
/* Print all refblocks ... debugging. Compile with DEBUG to enable
* this.
*/
static void print_all();
/* Typedefs and enums we need.
*/
// Type type
enum TType {
MULTIBAND = 0,
B_W = 1,
LUMINACE = 2,
XRAY = 3,
IR = 4,
YUV = 5,
RED_ONLY = 6,
GREEN_ONLY = 7,
BLUE_ONLY = 8,
POWER_SPECTRUM = 9,
HISTOGRAM = 10,
LUT = 11,
XYZ = 12,
LAB = 13,
CMC = 14,
CMYK = 15,
LABQ = 16,
RGB = 17,
UCS = 18,
LCH = 19,
LABS = 21,
sRGB = 22,
YXY = 23,
FOURIER = 24,
RGB16 = 25,
GREY16 = 26
};
// Format type
enum TBandFmt {
FMTNOTSET = -1,
FMTUCHAR = 0,
FMTCHAR = 1,
FMTUSHORT = 2,
FMTSHORT = 3,
FMTUINT = 4,
FMTINT = 5,
FMTFLOAT = 6,
FMTCOMPLEX = 7,
FMTDOUBLE = 8,
FMTDPCOMPLEX = 9
};
// Coding type
enum TCoding {
NOCODING = 0,
COLQUANT = 1,
LABPACK = 2,
LABPACK_COMPRESSED = 3,
RGB_COMPRESSED = 4,
LUM_COMPRESSED = 5,
RAD = 6
};
// Compression type
enum TCompression {
NO_COMPRESSION = 0,
TCSF_COMPRESSION = 1,
JPEG_COMPRESSION = 2
};
/* Start of wrappers for iofuncs.
*/
// Plain constructors
VImage( const char *name, const char *mode = "r" ) throw( VError );
VImage( void *data, int width, int height,
int bands, TBandFmt format ) throw( VError );
VImage( im__IMAGE *image );
VImage() throw( VError );
// Convert to a disc file, eg:
// VImage fred = VImage::convert2disc( "im_jpeg2vips",
// "file.jpg", "temp.v" );
// Runs im_jpeg2vips to the temp file, then opens that and returns
// it. Useful for opening very large files without using a lot of RAM.
// Now superceeded by the format API, though that's not yet wrapped in
// C++
static VImage convert2disc( const char* convert,
const char* in, const char* disc ) throw( VError );
// Copy constructor
VImage( const VImage &a );
// Assignment - delete old ref
VImage &operator=( const VImage &a ) throw( VError );
// Destructor
virtual ~VImage() throw( VError ) { _ref->removeref(); }
// Extract underlying IMAGE* pointer
im__IMAGE *image() const { return( _ref->im ); }
// Extract underlying data pointer
void *data() const throw( VError );
// Write this to another VImage, to a file, or to a mem buffer
VImage write( VImage out ) throw( VError );
VImage write( const char *name ) throw( VError );
VImage write() throw( VError );
// Debugging ... print header fields
void debug_print();
// Projection functions to get header fields
int Xsize();
int Ysize();
int Bands();
TBandFmt BandFmt();
TCoding Coding();
TType Type();
float Xres();
float Yres();
int Length();
TCompression Compression();
short Level();
int Xoffset();
int Yoffset();
// Derived fields
const char *filename();
const char *Hist();
// metadata
#ifndef SWIG
// base functionality
// we don't wrap GValue, so we can't wrap these for now
void meta_set( const char *field, GValue *value ) throw( VError );
void meta_get( const char *field, GValue *value_copy ) throw( VError );
GType meta_get_type( const char *field ) throw( VError );
#endif /*SWIG*/
// convenience functions
int meta_get_int( const char *field ) throw( VError );
double meta_get_double( const char *field ) throw( VError );
const char *meta_get_string( const char *field ) throw( VError );
void *meta_get_area( const char *field ) throw( VError );
void *meta_get_blob( const char *field, size_t *length )
throw( VError );
void meta_set( const char *field, int value ) throw( VError );
void meta_set( const char *field, double value ) throw( VError );
void meta_set( const char *field, const char *value ) throw( VError );
#ifndef SWIG
// we don't wrap callbacks yet, so we can't wrap these for now
void meta_set( const char *field,
VCallback free_fn, void *value )
throw( VError );
void meta_set( const char *field,
VCallback free_fn, void *value, size_t length )
throw( VError );
#endif /*SWIG*/
// Set header fields
void initdesc( int, int, int, TBandFmt, TCoding, TType,
float = 1.0, float = 1.0, int = 0, int = 0 ) throw( VError );
/* Insert automatically generated headers.
*/
#include "vipsc++.h"
/* No point getting SWIG to wrap these ... we do this by hand later so we can
* handle things like "a + 12" correctly.
*/
#ifndef SWIG
// And some in-line operator equivalences done by hand
friend VImage operator+( VImage a, VImage b ) throw( VError )
{ return( a.add( b ) ); }
friend VImage operator+( double a, VImage b ) throw( VError )
{ return( b.lin( 1.0, a ) ); }
friend VImage operator+( VImage a, double b ) throw( VError )
{ return( a.lin( 1.0, b ) ); }
friend VImage operator-( VImage a, VImage b ) throw( VError )
{ return( a.subtract( b ) ); }
friend VImage operator-( double a, VImage b ) throw( VError )
{ return( b.lin( -1.0, a ) ); }
friend VImage operator-( VImage a, double b ) throw( VError )
{ return( a.lin( 1.0, -b ) ); }
friend VImage operator*( VImage a, VImage b ) throw( VError )
{ return( a.multiply( b ) ); }
friend VImage operator*( double a, VImage b ) throw( VError )
{ return( b.lin( a, 0.0 ) ); }
friend VImage operator*( VImage a, double b ) throw( VError )
{ return( a.lin( b, 0.0 ) ); }
friend VImage operator/( VImage a, VImage b ) throw( VError )
{ return( a.divide( b ) ); }
friend VImage operator/( double a, VImage b ) throw( VError )
{ return( b.pow( -1.0 ).lin( a, 0.0 ) ); }
friend VImage operator/( VImage a, double b ) throw( VError )
{ return( a.lin( 1.0/b, 0.0 ) ); }
friend VImage operator%( VImage a, VImage b ) throw( VError )
{ return( a.remainder( b ) ); }
friend VImage operator%( VImage a, double b ) throw( VError )
{ return( a.remainder( b ) ); }
friend VImage operator<( VImage a, VImage b ) throw( VError )
{ return( a.less( b ) ); }
friend VImage operator<( double a, VImage b ) throw( VError )
{ return( b.more( a ) ); }
friend VImage operator<( VImage a, double b ) throw( VError )
{ return( a.less( b ) ); }
friend VImage operator<=( VImage a, VImage b ) throw( VError )
{ return( a.lesseq( b ) ); }
friend VImage operator<=( double a, VImage b ) throw( VError )
{ return( b.moreeq( a ) ); }
friend VImage operator<=( VImage a, double b ) throw( VError )
{ return( a.lesseq( b ) ); }
friend VImage operator>( VImage a, VImage b ) throw( VError )
{ return( a.more( b ) ); }
friend VImage operator>( double a, VImage b ) throw( VError )
{ return( b.less( a ) ); }
friend VImage operator>( VImage a, double b ) throw( VError )
{ return( a.more( b ) ); }
friend VImage operator>=( VImage a, VImage b ) throw( VError )
{ return( a.moreeq( b ) ); }
friend VImage operator>=( double a, VImage b ) throw( VError )
{ return( b.lesseq( a ) ); }
friend VImage operator>=( VImage a, double b ) throw( VError )
{ return( a.moreeq( b ) ); }
friend VImage operator==( VImage a, VImage b ) throw( VError )
{ return( a.equal( b ) ); }
friend VImage operator==( double a, VImage b ) throw( VError )
{ return( b.equal( a ) ); }
friend VImage operator==( VImage a, double b ) throw( VError )
{ return( a.equal( b ) ); }
friend VImage operator!=( VImage a, VImage b ) throw( VError )
{ return( a.notequal( b ) ); }
friend VImage operator!=( double a, VImage b ) throw( VError )
{ return( b.notequal( a ) ); }
friend VImage operator!=( VImage a, double b ) throw( VError )
{ return( a.notequal( b ) ); }
friend VImage operator&( VImage a, VImage b ) throw( VError )
{ return( a.andimage( b ) ); }
friend VImage operator&( int a, VImage b ) throw( VError )
{ return( b.andimage( a ) ); }
friend VImage operator&( VImage a, int b ) throw( VError )
{ return( a.andimage( b ) ); }
friend VImage operator|( VImage a, VImage b ) throw( VError )
{ return( a.orimage( b ) ); }
friend VImage operator|( int a, VImage b ) throw( VError )
{ return( b.orimage( a ) ); }
friend VImage operator|( VImage a, int b ) throw( VError )
{ return( a.orimage( b ) ); }
friend VImage operator^( VImage a, VImage b ) throw( VError )
{ return( a.eorimage( b ) ); }
friend VImage operator^( int a, VImage b ) throw( VError )
{ return( b.eorimage( a ) ); }
friend VImage operator^( VImage a, int b ) throw( VError )
{ return( a.eorimage( b ) ); }
friend VImage operator<<( VImage a, int b ) throw( VError )
{ return( a.shiftleft( b ) ); }
friend VImage operator>>( VImage a, int b ) throw( VError )
{ return( a.shiftright( b ) ); }
friend VImage operator-( VImage a ) throw( VError )
{ return( a * -1 ); }
// Type conversion: VImage to VDMask and VIMask
operator VDMask() throw( VError )
{ return( this->vips2mask() ); }
operator VIMask() throw( VError )
{ return( VIMask( VDMask( *this ) ) ); }
#endif /*!SWIG*/
};
/* Don't include these when parsing for SWIG.
*/
#ifndef SWIG
/* Class wrapping up a vargv. Member function wrappers need this. It needs to
* be part of the public API in case people subclass VImage and add their own
* members.
*/
class Vargv {
// Function we are args to
im__function *fn;
// Base of object vector
im__object *base;
public:
Vargv( const char *name );
~Vargv();
// Reference to element of base
im__object &data( int i = 0 ) { return( base[i] ); };
// Invoke function
void call();
};
#endif /*!SWIG*/
VIPS_NAMESPACE_END
// Other VIPS protos we need
extern "C" {
extern int im_init_world( const char *argv0 );
extern void im__print_all();
extern void im_col_Lab2XYZ(
float, float, float,
float *, float *, float * );
}
#endif /*IM_VIMAGE_H*/

View File

@ -1,410 +0,0 @@
/* VIPS mask class.
*
* Just like VImage, but we don't need dependency stuff. Instead, have a base
* wrapper over *MASK, derive VMaskD and VMaskI from that, and then put
* refcounting over all of them.
*/
/*
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_VMASK_H
#define IM_VMASK_H
/* SWIG includes this file directly rather than going through vipscpp.h ... so
* we have to define these macros here as well.
*/
#ifdef SWIG
# define VIPS_NAMESPACE_START namespace vips {
# define VIPS_NAMESPACE_END }
#endif /*SWIG*/
/* Don't include these when parsing for SWIG.
*/
#ifndef SWIG
# include <cstdarg>
# include <iosfwd>
# include <vector>
#endif /*!SWIG*/
/* Wrap pointers to these, but we don't want to import all the old C API. Just
* declare them.
*/
extern "C" {
struct im__INTMASK;
struct im__DOUBLEMASK;
}
VIPS_NAMESPACE_START
/* This first section is private. Only expose the non-P versions of these
* classes later on. Don't need to wrap then in SWIG either.
*/
#ifndef SWIG
namespace _private_detail {
union MASKUNION {
im__INTMASK *iptr;
im__DOUBLEMASK *dptr;
};
// Private wrapper over *MASK - user does not see this
class VPMask {
friend class VMask;
public:
// Track type of mask with this
enum VMaskType {
UNASSIGNED, // Not yet set
INT, // mask points to INTMASK
DOUBLE // mask points to DOUBLEMASK
};
MASKUNION data; // Mask pointer - INT or DOUBLE
VMaskType type; // Track type too, for safety
virtual ~VPMask() {};
// Duplicate
virtual VPMask *dup() const = 0;
// Projection functions to get MASK fields
virtual int xsize() const = 0;
virtual int ysize() const = 0;
virtual const char *filename() const = 0;
// Output
virtual void ostream_print( std::ostream & ) const = 0;
};
// Specialise for INTMASK
class VPIMask : public VPMask {
public:
VPIMask( int xsize, int ysize ) throw( VError );
VPIMask( int xsize, int ysize, int scale, int offset,
std::vector<int> coeff ) throw( VError );
VPIMask( const char * )
throw( VError );
VPIMask( im__INTMASK * );
VPIMask();
virtual ~VPIMask();
VPMask *dup() const throw( VError );
void embed( im__INTMASK * ) throw( VError );
int xsize() const throw( VError );
int ysize() const throw( VError );
int scale() const throw( VError );
int offset() const throw( VError );
const char *filename() const throw( VError );
// Output
virtual void ostream_print( std::ostream & ) const throw( VError );
// Extract start of array of ints
int *array() const;
};
// Specialise for DOUBLEMASK
class VPDMask : public VPMask {
public:
VPDMask( int xsize, int ysize ) throw( VError );
VPDMask( int xsize, int ysize,
double scale, double offset, std::vector<double> coeff )
throw( VError );
VPDMask( const char * ) throw( VError );
VPDMask( im__DOUBLEMASK * );
VPDMask();
virtual ~VPDMask();
VPMask *dup() const throw( VError );
void embed( im__DOUBLEMASK * ) throw( VError );
int xsize() const throw( VError );
int ysize() const throw( VError );
double scale() const throw( VError );
double offset() const throw( VError );
const char *filename() const throw( VError );
// Output
virtual void ostream_print( std::ostream & ) const throw( VError );
// Extract start of array of doubles
double *array() const;
};
} // end of namespace _private_detail
inline std::ostream &operator<<( std::ostream &file,
const _private_detail::VPMask &msk )
{
msk.ostream_print( file );
return( file );
}
#endif /*!SWIG*/
// Wrapper over VP?Mask with ref counting
class VMask {
protected:
struct refblock {
_private_detail::VPMask *pmask; // Mask: double or int
int nrefs; // Refs to us
refblock() : pmask(0), nrefs(1) {}
virtual ~refblock() { delete pmask; }
};
refblock *ref;
// Make sure this is a private copy of pmask --- dup if nrefs != 1
void make_private();
public:
// Constructor leaves msk uninitialised
VMask() { ref = new refblock; }
// Copy constructor
VMask( const VMask &a ) { ref = a.ref; ref->nrefs++; }
// Assignment
VMask &operator=( const VMask &a );
// Destructor
virtual ~VMask();
int xsize() const throw( VError )
{ return( ref->pmask->xsize() ); }
int ysize() const throw( VError )
{ return( ref->pmask->ysize() ); }
int size() const throw( VError )
{ return( xsize() * ysize() ); }
const char *filename() const throw( VError )
{ return( ref->pmask->filename() ); }
// Extract underlying type
_private_detail::VPMask::VMaskType type() const
{ return( ref->pmask->type ); }
// Extract underlying VIPS pointer
_private_detail::MASKUNION mask() const { return( ref->pmask->data ); }
void ostream_print( std::ostream & ) const;
};
inline std::ostream &operator<<( std::ostream &file, const VMask &msk )
{
msk.ostream_print( file );
return( file );
}
// Need to forward ref these
class VDMask;
class VImage;
// Wrapper over _private_detail::VPIMask with ref counting
class VIMask : public VMask {
public:
VIMask( int xsize, int ysize )
{
ref->pmask = new _private_detail::VPIMask( xsize, ysize );
}
/* Don't wrap the varargs constructor. We want Python to use the vector one.
*/
#ifndef SWIG
VIMask( int xsize, int ysize, int scale, int offset, ... )
{
va_list ap;
int i;
std::vector<int> coeff( xsize * ysize );
va_start( ap, offset );
for( i = 0; i < xsize * ysize; i++ )
coeff[i] = va_arg( ap, int );
va_end( ap );
ref->pmask = new _private_detail::VPIMask( xsize, ysize,
scale, offset, coeff );
}
#endif /*!SWIG*/
VIMask( int xsize, int ysize, int scale, int offset,
std::vector<int> coeff )
{
ref->pmask = new _private_detail::VPIMask( xsize, ysize,
scale, offset, coeff );
}
VIMask( const char *name )
{
ref->pmask = new _private_detail::VPIMask( name );
}
// No mask there yet
VIMask() {}
int scale()
{
return( ((_private_detail::VPIMask *)ref->pmask)->scale() );
}
int offset()
{
return( ((_private_detail::VPIMask *)ref->pmask)->offset() );
}
// Embed INTMASK in VIMask
void embed( im__INTMASK * ) throw( VError );
// Overload [] to get linear array subscript.
int &operator[]( int ) throw( VError );
// Overload () to get matrix subscript.
int &operator()( int x, int y ) throw( VError )
{ return( (*this)[x + y*xsize()] ); }
// and as a function call that SWIG can wrap
int get( int i ) throw( VError )
{ return( (*this)[i] ); }
// Type conversion: INTMASK->DOUBLEMASK
operator VDMask();
// Type conversion: INTMASK->image
operator VImage();
// VIMask build functions
static VIMask gauss( double, double ) throw( VError );
static VIMask gauss_sep( double, double ) throw( VError );
static VIMask log( double, double ) throw( VError );
// VIMask manipulation
VIMask rotate45() throw( VError );
VIMask rotate90() throw( VError );
// Arithmetic ... cast to double, and use VDMask funcs. For some
// reason, the compiler won't let us do casts to VDImage yet, so no
// inlines.
VDMask trn() throw( VError );
VDMask inv() throw( VError );
VDMask cat( VDMask ) throw( VError );
VDMask mul( VDMask ) throw( VError );
};
// Wrapper over _private_detail::VPDMask with ref counting
class VDMask : public VMask {
public:
VDMask( int xsize, int ysize )
{
ref->pmask = new _private_detail::VPDMask( xsize, ysize );
}
/* Don't wrap the varargs constructor. We want Python to use the vector one.
*/
#ifndef SWIG
VDMask( int xsize, int ysize, double scale, double offset, ... )
{
va_list ap;
int i;
std::vector<double> coeff( xsize * ysize );
va_start( ap, offset );
for( i = 0; i < xsize * ysize; i++ )
coeff[i] = va_arg( ap, double );
va_end( ap );
ref->pmask = new _private_detail::VPDMask( xsize, ysize,
scale, offset, coeff );
}
#endif /*!SWIG*/
VDMask( int xsize, int ysize, double scale, double offset,
std::vector<double> coeff )
{
ref->pmask = new _private_detail::VPDMask( xsize, ysize,
scale, offset, coeff );
}
VDMask( const char *name )
{
ref->pmask = new _private_detail::VPDMask( name );
}
// No mask yet
VDMask() { }
// Embed DOUBLEMASK in VDMask
void embed( im__DOUBLEMASK * ) throw( VError );
double scale() throw( VError )
{
return( ((_private_detail::VPDMask *)ref->pmask)->scale() );
}
double offset() throw( VError )
{
return( ((_private_detail::VPDMask *)ref->pmask)->offset() );
}
// Overload [] to get linear array subscript.
double &operator[]( int ) throw( VError );
// Overload () to get matrix subscript.
double &operator()( int x, int y ) throw( VError )
{ return( (*this)[x + y*xsize()] ); }
// and as a function call that SWIG can wrap
double get( int i ) throw( VError )
{ return( (*this)[i] ); }
// Type conversion: double->int
operator VIMask();
// Type conversion: DOUBLEMASK->image
operator VImage() throw( VError );
// VDMask build functions
static VDMask gauss( double, double ) throw( VError );
static VDMask log( double, double ) throw( VError );
// VDMask manipulation
VDMask rotate45() throw( VError );
VDMask rotate90() throw( VError );
// Scale to intmask
VIMask scalei() throw( VError );
// Simple arithmetic
VDMask trn() throw( VError );
VDMask inv() throw( VError );
VDMask cat( VDMask ) throw( VError );
VDMask mul( VDMask ) throw( VError );
};
VIPS_NAMESPACE_END
#endif /*IM_VMASK_H*/

View File

@ -1,85 +0,0 @@
/* A static string buffer, with overflow protection.
*/
/*
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 VIPS_BUF_H
#define VIPS_BUF_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/* A string in the process of being written to ... multiple calls to
* vips_buf_append add to it, on overflow append "..." and block further writes.
*/
typedef struct {
char *base; /* String base */
int mx; /* Maximum length */
int i; /* Current write point */
gboolean full; /* String has filled, block writes */
int lasti; /* For read-recent */
gboolean dynamic; /* We own the string with malloc() */
} VipsBuf;
/* Static init of one of these.
*/
#define VIPS_BUF_STATIC( TEXT ) \
{ &TEXT[0], sizeof( TEXT ), 0, FALSE, 0, FALSE }
/* Init and append to one of the above.
*/
void vips_buf_rewind( VipsBuf *buf );
void vips_buf_destroy( VipsBuf *buf );
void vips_buf_init( VipsBuf *buf );
void vips_buf_set_static( VipsBuf *buf, char *base, int mx );
void vips_buf_set_dynamic( VipsBuf *buf, int mx );
void vips_buf_init_static( VipsBuf *buf, char *base, int mx );
void vips_buf_init_dynamic( VipsBuf *buf, int mx );
gboolean vips_buf_appendns( VipsBuf *buf, const char *str, int sz );
gboolean vips_buf_appends( VipsBuf *buf, const char *str );
gboolean vips_buf_appendf( VipsBuf *buf, const char *fmt, ... )
__attribute__((format(printf, 2, 3)));
gboolean vips_buf_vappendf( VipsBuf *buf, const char *fmt, va_list ap );
gboolean vips_buf_appendc( VipsBuf *buf, char ch );
gboolean vips_buf_appendsc( VipsBuf *buf, gboolean quote, const char *str );
void vips_buf_appendgv( VipsBuf *buf, GValue *value );
gboolean vips_buf_removec( VipsBuf *buf, char ch );
gboolean vips_buf_change( VipsBuf *buf, const char *old, const char * );
gboolean vips_buf_is_empty( VipsBuf *buf );
gboolean vips_buf_is_full( VipsBuf *buf );
const char *vips_buf_all( VipsBuf *buf );
const char *vips_buf_firstline( VipsBuf *buf );
gboolean vips_buf_appendg( VipsBuf *buf, double g );
gboolean vips_buf_appendd( VipsBuf *buf, int d );
int vips_buf_len( VipsBuf *buf );
#endif /*VIPS_BUF_H*/
#ifdef __cplusplus
}
#endif /*__cplusplus*/

View File

@ -1,234 +0,0 @@
/* Definitions for VIPS colour package.
*
* J.Cupitt, 8/4/93
* 15/7/96 JC
* - C++ stuff added
* 20/2/98 JC
* - new display calibration added
* 26/9/05
* - added IM_ prefix to colour temps
*/
/*
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_COLOUR_H
#define IM_COLOUR_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#include <vips/util.h>
/* Convert degrees->rads and vice-versa.
*/
#define IM_RAD( r ) (((r) / 360.0) * 2.0 * IM_PI)
#define IM_DEG( a ) (((a) / (2.0 * IM_PI)) * 360.0)
/* Areas under curves for Dxx. 2 degree observer.
*/
#define IM_D93_X0 (89.7400)
#define IM_D93_Y0 (100.0)
#define IM_D93_Z0 (130.7700)
#define IM_D75_X0 (94.9682)
#define IM_D75_Y0 (100.0)
#define IM_D75_Z0 (122.5710)
/* D65 temp 6504.
*/
#define IM_D65_X0 (95.0470)
#define IM_D65_Y0 (100.0)
#define IM_D65_Z0 (108.8827)
#define IM_D55_X0 (95.6831)
#define IM_D55_Y0 (100.0)
#define IM_D55_Z0 (92.0871)
#define IM_D50_X0 (96.4250)
#define IM_D50_Y0 (100.0)
#define IM_D50_Z0 (82.4680)
/* A temp 2856k.
*/
#define IM_A_X0 (109.8503)
#define IM_A_Y0 (100.0)
#define IM_A_Z0 (35.5849)
/* B temp 4874k.
*/
#define IM_B_X0 (99.0720)
#define IM_B_Y0 (100.0)
#define IM_B_Z0 (85.2230)
/* C temp 6774k.
*/
#define IM_C_X0 (98.0700)
#define IM_C_Y0 (100.0)
#define IM_C_Z0 (118.2300)
#define IM_E_X0 (100.0)
#define IM_E_Y0 (100.0)
#define IM_E_Z0 (100.0)
#define IM_D3250_X0 (105.6590)
#define IM_D3250_Y0 (100.0)
#define IM_D3250_Z0 (45.8501)
/* Two kinds of display. A DISP_BARCO does gamma correction etc etc for us and
* needs only a colour space transform, a DISP_DUMB is an ordinary display and
* needs a full range of corrections.
*/
enum im_col_disp_type {
DISP_BARCO = 0,
DISP_DUMB
};
/* Structure for holding information about a display device. See the BARCO
* papers for details on the fields.
*/
struct im_col_display {
char *d_name; /* Display name */
enum im_col_disp_type d_type; /* Display type */
float d_mat[3][3]; /* XYZ -> luminance matrix */
float d_YCW; /* Luminosity of reference white */
float d_xCW; /* x, y for reference white */
float d_yCW;
float d_YCR; /* Light o/p for reference white */
float d_YCG;
float d_YCB;
int d_Vrwr; /* Pixel values for ref. white */
int d_Vrwg;
int d_Vrwb;
float d_Y0R; /* Residual light for black pixel */
float d_Y0G;
float d_Y0B;
float d_gammaR; /* Gamma values for the three guns */
float d_gammaG;
float d_gammaB;
float d_B; /* 'Background' (like brightness) */
float d_P; /* 'Picture' (like contrast) */
};
/* Structure for holding the lookup tables for XYZ<=>rgb conversion.
* Also holds the luminance to XYZ matrix and the inverse one.
*/
struct im_col_tab_disp {
float t_Yr2r[1501]; /* Conversion of Yr to r */
float t_Yg2g[1501]; /* Conversion of Yg to g */
float t_Yb2b[1501]; /* Conversion of Yb to b */
float t_r2Yr[1501]; /* Conversion of r to Yr */
float t_g2Yg[1501]; /* Conversion of g to Yg */
float t_b2Yb[1501]; /* Conversion of b to Yb */
float mat_XYZ2lum[3][3]; /* XYZ to Yr, Yg, Yb matrix */
float mat_lum2XYZ[3][3]; /* Yr, Yg, Yb to XYZ matrix */
float rstep, gstep, bstep;
float ristep, gistep, bistep;
};
/* Colour loading and conversion functions.
*/
void im_col_ab2Ch( float a, float b, float *C, float *h );
void im_col_LCh2ab( float L, float C, float h, float *a, float *b );
void im_col_XYZ2Lab( float X, float Y, float Z, float *L, float *a, float *b );
void im_col_Lab2XYZ( float L, float a, float b, float *X, float *Y, float *Z );
float im_col_pythagoras( float L1, float a1, float b1,
float L2, float a2, float b2 );
struct im_col_tab_disp *im_col_make_tables_RGB(
IMAGE *im,
struct im_col_display *d );
int im_col_rgb2XYZ( struct im_col_display *d,
struct im_col_tab_disp *table,
int r, int g, int b,
float *X, float *Y, float *Z );
int im_col_XYZ2rgb(
struct im_col_display *d, struct im_col_tab_disp *table,
float X, float Y, float Z,
int *r_ret, int *g_ret, int *b_ret,
int *or_ret );
float im_col_L2Lucs( float L );
float im_col_Lucs2L( float Lucs );
float im_col_C2Cucs( float C );
float im_col_Cucs2C( float Cucs );
float im_col_Ch2hucs( float C, float h );
float im_col_Chucs2h( float C, float hucs );
double im_col_ab2h( double a, double b );
int im_ICC2display( char *filename, struct im_col_display *dpy );
int im_XYZ2disp( IMAGE *, IMAGE *, struct im_col_display * );
int im_Lab2disp( IMAGE *, IMAGE *, struct im_col_display * );
int im_LabQ2disp( IMAGE *, IMAGE *, struct im_col_display * );
int im_disp2XYZ( IMAGE *, IMAGE *, struct im_col_display * );
int im_disp2Lab( IMAGE *, IMAGE *, struct im_col_display * );
void *im_LabQ2disp_build_table( IMAGE *out, struct im_col_display *d );
int im_LabQ2disp_table( IMAGE *in, IMAGE *out, void *table );
int im_dE_fromdisp( IMAGE *, IMAGE *, IMAGE *, struct im_col_display * );
int im_dECMC_fromdisp( IMAGE *, IMAGE *, IMAGE *, struct im_col_display * );
int im_dE00_fromLab( IMAGE *, IMAGE *, IMAGE * );
/* Colour display values and arrays
&im_col_screen_white, index 0
&im_col_SPARC_white, index 1
&im_col_D65_white, index 2
&im_col_barco_white, index 3
&im_col_mitsubishi, index 4
&im_col_relative, index 5
&ultra2, index 6
&srgb_profile, index 7
*/
struct im_col_display *im_col_displays( int );
struct im_col_display *im_col_display_name( const char * );
/* Render intents for icc wrappers.
*/
#define IM_INTENT_PERCEPTUAL (0)
#define IM_INTENT_RELATIVE_COLORIMETRIC (1)
#define IM_INTENT_SATURATION (2)
#define IM_INTENT_ABSOLUTE_COLORIMETRIC (3)
int im_icc_present( void );
int im_icc_transform( IMAGE *in, IMAGE *out,
const char *input_profile_filename,
const char *output_profile_filename,
int intent );
int im_icc_import( IMAGE *in, IMAGE *out,
const char *input_profile_filename, int intent );
int im_icc_import_embedded( IMAGE *in, IMAGE *out, int intent );
int im_icc_export( IMAGE *in, IMAGE *out,
const char *output_profile_filename, int intent );
int im_icc_export_depth( IMAGE *in, IMAGE *out, int depth,
const char *output_profile_filename, int intent );
int im_icc_ac2rc( IMAGE *in, IMAGE *out, const char *profile_filename );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_COLOUR_H*/

View File

@ -1,50 +0,0 @@
/* Support for debug.c in iofuncs.
*/
/*
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_DEBUG_H
#define IM_DEBUG_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/* All open image descriptors ... see im_init() and im_close().
*/
extern GSList *im__open_images;
/* Print one line for each descriptor, complete dump for one descriptor.
*/
void im__print_one( int n );
void im__print_all( void );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /* IM_DEBUG_H */

View File

@ -1,295 +0,0 @@
/* VIPS function dispatch.
*
* 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_DISPATCH_H
#define IM_DISPATCH_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#include <glib-object.h>
#include <vips/vips.h>
#include <vips/util.h>
/* Type names. You may define your own, but if you use one of these, then
* you should use the built-in VIPS type converters.
*/
#define IM_TYPE_IMAGEVEC "imagevec" /* im_object is ptr to IMAGE[] */
#define IM_TYPE_DOUBLEVEC "doublevec" /* im_object is ptr to double[] */
#define IM_TYPE_INTVEC "intvec" /* im_object is ptr to int[] */
#define IM_TYPE_DOUBLE "double" /* im_object is ptr to double */
#define IM_TYPE_INT "integer" /* 32-bit integer */
#define IM_TYPE_COMPLEX "complex" /* Pair of doubles */
#define IM_TYPE_STRING "string" /* Zero-terminated char array */
#define IM_TYPE_IMASK "intmask" /* Integer mask type */
#define IM_TYPE_DMASK "doublemask" /* Double mask type */
#define IM_TYPE_IMAGE "image" /* IMAGE descriptor */
#define IM_TYPE_DISPLAY "display" /* Display descriptor */
#define IM_TYPE_GVALUE "gvalue" /* GValue wrapper */
#define IM_TYPE_INTERPOLATE "interpolate"/* A subclass of VipsInterpolate */
typedef char *im_arg_type; /* Type of argument id */
/* Internal representation of an argument to an image processing function.
*/
typedef void *im_object;
/* These bits are ored together to make the flags in a type descriptor.
*
* IM_TYPE_OUTPUT: set to indicate output, otherwise input.
*
* IM_TYPE_ARG: Two ways of making an im_object --- with and without a
* command-line string to help you along. Arguments with a string are thing
* like IMAGE descriptors, which require a filename to initialise.
* Arguments without are things like output numbers, where making the object
* simply involves allocating storage.
*/
typedef enum {
IM_TYPE_NONE = 0, /* No flags */
IM_TYPE_OUTPUT = 0x1, /* Output/input object */
IM_TYPE_ARG = 0x2 /* Uses a str arg in construction */
} im_type_flags;
/* Initialise, destroy and write objects. The "str" argument to the
* init function will not be supplied if this is not an ARG type. The
* write function writes to the GString.
*/
typedef int (*im_init_obj_fn)( im_object *obj, char *str );
typedef int (*im_dest_obj_fn)( im_object obj );
/* Describe a VIPS type.
*/
typedef struct {
im_arg_type type; /* Type of argument */
int size; /* sizeof( im_object repres. ) */
im_type_flags flags; /* Flags */
im_init_obj_fn init; /* Operation functions */
im_dest_obj_fn dest; /* Destroy object */
} im_type_desc;
/* Success on an argument. This is called if the image processing function
* succeeds and should be used to (for example) print output.
*/
typedef int (*im_print_obj_fn)( im_object obj );
/* Describe a VIPS command argument.
*/
typedef struct {
char *name; /* eg. "width" */
im_type_desc *desc; /* Type description */
im_print_obj_fn print; /* Print some output objects */
} im_arg_desc;
/* Type of VIPS dispatch funtion.
*/
typedef int (*im_dispatch_fn)( im_object *argv );
/* Maximum size of arg table.
*/
#define IM_MAX_ARGS (1000)
/* Flags for functions. These are for information only, and more may be
* added.
*/
typedef enum {
IM_FN_NONE = 0, /* No flags set */
IM_FN_PIO = 0x1, /* Is a partial function */
IM_FN_TRANSFORM = 0x2, /* Performs coordinate transformations */
IM_FN_PTOP = 0x4, /* Point-to-point ... can be done with a LUT */
IM_FN_NOCACHE = 0x8 /* Result should not be cached */
} im_fn_flags;
/* Describe a VIPS function.
*/
typedef struct {
char *name; /* eg "im_invert" */
char *desc; /* Description - eg "photographic negative" */
im_fn_flags flags; /* Flags for this function */
im_dispatch_fn disp; /* Dispatch */
int argc; /* Number of args */
im_arg_desc *argv; /* Arg table */
} im_function;
/* A set of VIPS functions forming a package.
*/
typedef struct {
char *name; /* Package name (eg "arithmetic") */
int nfuncs; /* Number of functions in package */
im_function **table; /* Array of function descriptors */
} im_package;
/* Externs for dispatch.
*/
/* Struct for mask IO to a file.
*/
typedef struct {
char *name; /* Command-line name in */
void *mask; /* Mask --- DOUBLE or INT */
} im_mask_object;
/* Struct for doublevec IO
*/
typedef struct {
int n; /* Vector length */
double *vec; /* Vector */
} im_doublevec_object;
/* Struct for intvec IO
*/
typedef struct {
int n; /* Vector length */
int *vec; /* Vector */
} im_intvec_object;
/* Struct for imagevec IO
*/
typedef struct {
int n; /* Vector length */
IMAGE **vec; /* Vector */
} im_imagevec_object;
/* Built-in VIPS types.
*/
extern im_type_desc im__input_int;
extern im_type_desc im__input_intvec;
extern im_type_desc im__input_imask;
extern im_type_desc im__output_int;
extern im_type_desc im__output_intvec;
extern im_type_desc im__output_imask;
extern im_type_desc im__input_double;
extern im_type_desc im__input_doublevec;
extern im_type_desc im__input_dmask;
extern im_type_desc im__output_double;
extern im_type_desc im__output_doublevec;
extern im_type_desc im__output_dmask;
extern im_type_desc im__output_dmask_screen;
extern im_type_desc im__output_complex;
extern im_type_desc im__input_string;
extern im_type_desc im__output_string;
extern im_type_desc im__input_imagevec;
extern im_type_desc im__input_image;
extern im_type_desc im__output_image;
extern im_type_desc im__rw_image;
extern im_type_desc im__input_display;
extern im_type_desc im__output_display;
extern im_type_desc im__input_gvalue;
extern im_type_desc im__output_gvalue;
extern im_type_desc im__input_interpolate;
/* VIPS print functions.
*/
int im__iprint( im_object obj ); /* int */
int im__ivprint( im_object obj ); /* intvec */
int im__dprint( im_object obj ); /* double */
int im__dvprint( im_object obj ); /* doublevec */
int im__dmsprint( im_object obj ); /* DOUBLEMASK as stats */
int im__cprint( im_object obj ); /* complex */
int im__sprint( im_object obj ); /* string */
int im__displayprint( im_object obj ); /* im_col_display */
int im__gprint( im_object obj ); /* GValue */
/* Macros for convenient creation.
*/
#define IM_INPUT_INT( S ) { S, &im__input_int, NULL }
#define IM_INPUT_INTVEC( S ) { S, &im__input_intvec, NULL }
#define IM_INPUT_IMASK( S ) { S, &im__input_imask, NULL }
#define IM_OUTPUT_INT( S ) { S, &im__output_int, im__iprint }
#define IM_OUTPUT_INTVEC( S ) { S, &im__output_intvec, im__ivprint }
#define IM_OUTPUT_IMASK( S ) { S, &im__output_imask, NULL }
#define IM_INPUT_DOUBLE( S ) { S, &im__input_double, NULL }
#define IM_INPUT_DOUBLEVEC( S ) { S, &im__input_doublevec, NULL }
#define IM_INPUT_DMASK( S ) { S, &im__input_dmask, NULL }
#define IM_OUTPUT_DOUBLE( S ) { S, &im__output_double, im__dprint }
#define IM_OUTPUT_DOUBLEVEC( S ) { S, &im__output_doublevec, im__dvprint }
#define IM_OUTPUT_DMASK( S ) { S, &im__output_dmask, NULL }
#define IM_OUTPUT_DMASK_STATS( S ) { S, &im__output_dmask_screen, im__dmsprint }
#define IM_OUTPUT_COMPLEX( S ) { S, &im__output_complex, im__cprint }
#define IM_INPUT_STRING( S ) { S, &im__input_string, NULL }
#define IM_OUTPUT_STRING( S ) { S, &im__output_string, im__sprint }
#define IM_INPUT_IMAGE( S ) { S, &im__input_image, NULL }
#define IM_INPUT_IMAGEVEC( S ) { S, &im__input_imagevec, NULL }
#define IM_OUTPUT_IMAGE( S ) { S, &im__output_image, NULL }
#define IM_RW_IMAGE( S ) { S, &im__rw_image, NULL }
#define IM_INPUT_DISPLAY( S ) { S, &im__input_display, NULL }
#define IM_OUTPUT_DISPLAY( S ) { S, &im__output_display, im__displayprint }
#define IM_INPUT_GVALUE( S ) { S, &im__input_gvalue, NULL }
#define IM_OUTPUT_GVALUE( S ) { S, &im__output_gvalue, im__gprint }
#define IM_INPUT_INTERPOLATE( S ) { S, &im__input_interpolate, NULL }
/* Add a plug-in package.
*/
im_package *im_load_plugin( const char *name );
int im_load_plugins( const char *fmt, ... )
__attribute__((format(printf, 1, 2)));
/* Close all plug-ins.
*/
int im_close_plugins( void );
/* Loop over all loaded packages.
*/
void *im_map_packages( VSListMap2Fn fn, void *a );
/* Convenience functions for finding packages, functions, etc.
*/
im_function *im_find_function( const char *name );
im_package *im_find_package( const char *name );
im_package *im_package_of_function( const char *name );
/* Allocate space for, and free im_object argument lists.
*/
int im_free_vargv( im_function *fn, im_object *vargv );
int im_allocate_vargv( im_function *fn, im_object *vargv );
/* Run a VIPS command by name.
*/
int im_run_command( char *name, int argc, char **argv );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_DISPATCH_H*/

View File

@ -1,86 +0,0 @@
/* @(#) Typical filter function
* va_list is filter parameters
* lowpass highpass filters
* flag = 0 -> idealhpf, parameters: frequency cutoff
* flag = 1 -> ideallpf, parameters: frequency cutoff
* flag = 2 -> buthpf, parameters: order, frequency cutoff, amplitude cutoff
* flag = 3 -> butlpf, parameters: order, frequency cutoff, amplitude cutoff
* flag = 4 -> gaussianlpf, parameters: frequency cutoff, amplitude cutoff
* flag = 5 -> gaussianhpf, parameters: frequency cutoff, amplitude cutoff
* ring pass ring reject filters
* flag = 6 -> idealrpf, parameters: frequency cutoff, width
* flag = 7 -> idealrrf, parameters: frequency cutoff, width
* flag = 8 -> butrpf, parameters: order, freq cutoff, width, ampl cutoff
* flag = 9 -> butrrf, parameters: order, freq cutoff, width, ampl cutoff
* flag = 10 -> gaussianrpf, parameters: frequency cutoff, width, ampl cutoff
* flag = 11 -> gaussianrrf, parameters: frequency cutoff, width, ampl cutoff
* bandpass bandreject filters
* flag = 12 -> idealbpf, parameters: center frequency, 2*radius
* flag = 13 -> idealbrf, parameters: centre frequency, 2*radius
* flag = 14 -> butbpf, parameters: order, frequency, 2*radius, ampl cutoff
* flag = 15 -> butbrf, parameters: order, frequency, 2*radius, ampl cutoff
* flag = 16 -> gaussianbpf, parameters: frequency cutoff, width, ampl cutoff
* flag = 17 -> gaussianbrf, parameters: frequency cutoff, width, ampl cutoff
* fractal filters (for filtering gaussian noises only)
* flag = 18 -> fractal, parameters: fractal dimension
*/
/*
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_FMASK_H
#define IM_FMASK_H
typedef enum mask_type {
MASK_IDEAL_HIGHPASS = 0,
MASK_IDEAL_LOWPASS = 1,
MASK_BUTTERWORTH_HIGHPASS = 2,
MASK_BUTTERWORTH_LOWPASS = 3,
MASK_GAUSS_HIGHPASS = 4,
MASK_GAUSS_LOWPASS = 5,
MASK_IDEAL_RINGPASS = 6,
MASK_IDEAL_RINGREJECT = 7,
MASK_BUTTERWORTH_RINGPASS = 8,
MASK_BUTTERWORTH_RINGREJECT = 9,
MASK_GAUSS_RINGPASS = 10,
MASK_GAUSS_RINGREJECT = 11,
MASK_IDEAL_BANDPASS = 12,
MASK_IDEAL_BANDREJECT = 13,
MASK_BUTTERWORTH_BANDPASS = 14,
MASK_BUTTERWORTH_BANDREJECT = 15,
MASK_GAUSS_BANDPASS = 16,
MASK_GAUSS_BANDREJECT = 17,
MASK_FRACTAL_FLT = 18
} MaskType;
int im_flt_image_freq( IMAGE *in, IMAGE *out, MaskType flag, ... );
int im_create_fmask( IMAGE *out, int xsize, int ysize, MaskType flag, ... );
int im__fmaskcir( IMAGE *out, MaskType flag, va_list ap );
#endif /*IM_FMASK_H*/

View File

@ -1,124 +0,0 @@
/* Base type for supported image formats. Subclass this to add a new
* format.
*/
/*
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_FORMAT_H
#define IM_FORMAT_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#define VIPS_TYPE_FORMAT (vips_format_get_type())
#define VIPS_FORMAT( obj ) \
(G_TYPE_CHECK_INSTANCE_CAST( (obj), \
VIPS_TYPE_FORMAT, VipsFormat ))
#define VIPS_FORMAT_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_CAST( (klass), \
VIPS_TYPE_FORMAT, VipsFormatClass))
#define VIPS_IS_FORMAT( obj ) \
(G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_FORMAT ))
#define VIPS_IS_FORMAT_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_FORMAT ))
#define VIPS_FORMAT_GET_CLASS( obj ) \
(G_TYPE_INSTANCE_GET_CLASS( (obj), \
VIPS_TYPE_FORMAT, VipsFormatClass ))
/* Image file properties.
*/
typedef enum {
VIPS_FORMAT_NONE = 0, /* No flags set */
VIPS_FORMAT_PARTIAL = 1 /* Lazy read OK (eg. tiled tiff) */
} VipsFormatFlags;
/* Don't instantiate these things, just use the class stuff.
*/
typedef struct _VipsFormat {
VipsObject parent_object;
} VipsFormat;
typedef struct _VipsFormatClass {
VipsObjectClass parent_class;
/* Is a file in this format.
*/
gboolean (*is_a)( const char * );
/* Read just the header into the IMAGE.
*/
int (*header)( const char *, IMAGE * );
/* Load the whole image.
*/
int (*load)( const char *, IMAGE * );
/* Write the IMAGE to the file in this format.
*/
int (*save)( IMAGE *, const char * );
/* Get the flags for this file in this format.
*/
VipsFormatFlags (*get_flags)( const char * );
/* Loop over formats in this order, default 0. We need this because
* some formats can be read by several loaders (eg. tiff can be read
* by the libMagick loader as well as by the tiff loader), and we want
* to make sure the better loader comes first.
*/
int priority;
/* Null-terminated list of allowed suffixes, eg. ".tif", ".tiff".
*/
const char **suffs;
} VipsFormatClass;
GType vips_format_get_type( void );
/* Map over and find formats. This uses type introspection to loop over
* subclasses of VipsFormat.
*/
void *vips_format_map( VSListMap2Fn fn, void *a, void *b );
VipsFormatClass *vips_format_for_file( const char *filename );
VipsFormatClass *vips_format_for_name( const char *filename );
VipsFormatFlags vips_format_get_flags( VipsFormatClass *format,
const char *filename );
/* Read/write an image convenience functions.
*/
int vips_format_read( const char *name, IMAGE *out );
int vips_format_write( IMAGE *im, const char *name );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_FORMAT_H*/

View File

@ -1,70 +0,0 @@
/* Inline maths functions if they are missing from libm
*/
/*
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_INLINE_H
#define IM_INLINE_H
/* glib promises to define inline in a portable way */
#include <glib.h>
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#ifdef HAVE_HYPOT
#define im__hypot hypot
#else /* HAVE_HYPOT */
static inline double im__hypot( double a, double b ){
double ta= fabs( a );
double tb= fabs( b );
if( ta > tb ){
tb= b / a;
return ta * sqrt( 1.0 + tb * tb );
}
else {
ta= a / b;
return tb * sqrt( 1.0 + ta * ta );
}
}
#endif /* HAVE_HYPOT */
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_INLINE_H*/

View File

@ -1,177 +0,0 @@
/* Prototypes for internal VIPS functions.
*
* 11/9/06
* - cut from proto.h
*/
/*
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_INTERNAL_H
#define IM_INTERNAL_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/* What we store in the Meta hash table. We can't just use GHashTable's
* key/value pairs, since we need to iterate over meta in Meta_traverse order.
*
* We don't refcount at this level ... large meta values are refcounted by
* their GValue implementation, see eg. MetaArea.
*/
typedef struct _Meta {
IMAGE *im;
char *field; /* strdup() of field name */
GValue value; /* copy of value */
} Meta;
void im__meta_init_types( void );
void im__meta_destroy( IMAGE *im );
int im__meta_cp( IMAGE *, const IMAGE * );
/* Default tile geometry.
*/
extern int im__tile_width;
extern int im__tile_height;
extern int im__fatstrip_height;
extern int im__thinstrip_height;
/* Default n threads.
*/
extern int im__concurrency;
/* Give progress feedback.
*/
extern int im__progress;
typedef int (*im__fftproc_fn)( IMAGE *, IMAGE *, IMAGE * );
/* iofuncs
*/
void im__read_4byte( int msb_first, unsigned char *to, unsigned char **from );
void im__read_2byte( int msb_first, unsigned char *to, unsigned char **from );
void im__write_4byte( unsigned char **to, unsigned char *from );
void im__write_2byte( unsigned char **to, unsigned char *from );
int im__ftruncate( int fd, gint64 pos );
int im__seek( int fd, gint64 pos );
int im__get_bytes( const char *filename, unsigned char buf[], int len );
gint64 im__image_pixel_length( IMAGE *im );
int im__open_image_file( const char * );
void im__format_init( void );
void im__type_init( void );
int im__read_header_bytes( IMAGE *im, unsigned char *from );
int im__write_header_bytes( IMAGE *im, unsigned char *to );
int im__has_extension_block( IMAGE *im );
void *im__read_extension_block( IMAGE *im, int *size );
int im__write_extension_block( IMAGE *im, void *buf, int size );
int im__writehist( IMAGE *image );
int im__start_eval( IMAGE *im );
int im__handle_eval( IMAGE *im, int w, int h );
int im__end_eval( IMAGE *im );
int im__time_destroy( IMAGE *im );
void im__tiff_register( void );
void im__jpeg_register( void );
void im__png_register( void );
void im__csv_register( void );
void im__ppm_register( void );
void im__analyze_register( void );
void im__exr_register( void );
void im__magick_register( void );
extern int im__read_test;
extern int im__mmap_limit;
extern GMutex *im__global_lock;
typedef enum {
IM__RGB, /* 1 or 3 bands (like PPM) */
IM__RGBA, /* 1, 2, 3 or 4 bands (like PNG) */
IM__RGB_CMYK /* 1, 3 or 4 bands (like JPEG) */
} im__saveable_t;
IMAGE *im__convert_saveable( IMAGE *in, im__saveable_t saveable );
void im__link_make( IMAGE *parent, IMAGE *child );
void im__link_break_all( IMAGE *im );
void *im__link_map( IMAGE *im, VSListMap2Fn fn, void *a, void *b );
GValue *im__gvalue_ref_string_new( const char *text );
void im__gslist_gvalue_free( GSList *list );
GSList *im__gslist_gvalue_copy( const GSList *list );
GSList *im__gslist_gvalue_merge( GSList *a, const GSList *b );
char *im__gslist_gvalue_get( const GSList *list );
void im__buffer_init( void );
int im__cast_and_call();
int im__test_kill( IMAGE *im );
void *im__mmap( int fd, int writeable, size_t length, gint64 offset );
int im__munmap( void *start, size_t length );
int im__write( int, const void *, size_t );
void im__change_suffix( const char *name, char *out, int mx,
const char *new_suff, const char **olds, int nolds );
void im__print_all( void );
void im__print_one( int );
int im__trigger_callbacks( GSList *cblist );
int im__close( IMAGE * );
int im__handle_eval( IMAGE *im, int w, int h );
int im__create_int_luts( int *, int, int **, int **, int * );
int im__create_double_luts( double *, int, double **, double **, int * );
int im__fft_sp( float *rvec, float *ivec, int logrows, int logcols );
int im__fftproc( IMAGE *dummy, IMAGE *in, IMAGE *out, im__fftproc_fn fn );
int im__mean_std_double_buffer( double *buffer, int size,
double *pmean, double *pstd );
int im__mean_std_int_buffer( int *buffer, int size,
double *pmean, double *pstd );
int im__find_lroverlap( IMAGE *ref_in, IMAGE *sec_in, IMAGE *out,
int bandno_in,
int xref, int yref, int xsec, int ysec,
int halfcorrelation, int halfarea,
int *dx0, int *dy0,
double *scale1, double *angle1, double *dx1, double *dy1 );
int im__find_tboverlap( IMAGE *ref_in, IMAGE *sec_in, IMAGE *out,
int bandno_in,
int xref, int yref, int xsec, int ysec,
int halfcorrelation, int halfarea,
int *dx0, int *dy0,
double *scale1, double *angle1, double *dx1, double *dy1 );
int im__find_best_contrast( IMAGE *image,
int xpos, int ypos, int xsize, int ysize,
int xarray[], int yarray[], int cont[],
int nbest, int hcorsize );
int im__balance( IMAGE *ref, IMAGE *sec, IMAGE *out,
IMAGE **ref_out, IMAGE **sec_out, int dx, int dy, int balancetype );
void im__black_region( REGION *reg );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_INTERNAL_H*/

View File

@ -1,123 +0,0 @@
/* Various interpolators.
*
* J.Cupitt, 15/10/08
*/
/*
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 VIPS_INTERPOLATE_H
#define VIPS_INTERPOLATE_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#define VIPS_TYPE_INTERPOLATE (vips_interpolate_get_type())
#define VIPS_INTERPOLATE( obj ) \
(G_TYPE_CHECK_INSTANCE_CAST( (obj), \
VIPS_TYPE_INTERPOLATE, VipsInterpolate ))
#define VIPS_INTERPOLATE_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_CAST( (klass), \
VIPS_TYPE_INTERPOLATE, VipsInterpolateClass))
#define VIPS_IS_INTERPOLATE( obj ) \
(G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_INTERPOLATE ))
#define VIPS_IS_INTERPOLATE_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_INTERPOLATE ))
#define VIPS_INTERPOLATE_GET_CLASS( obj ) \
(G_TYPE_INSTANCE_GET_CLASS( (obj), \
VIPS_TYPE_INTERPOLATE, VipsInterpolateClass ))
typedef struct _VipsInterpolate {
VipsObject parent_object;
} VipsInterpolate;
/* An interpolation function. This is a class method, but we have a lookup
* function for it to speed up dispatch. Write to the memory at "out",
* interpolate the value at position (x, y) in "in".
*/
typedef void (*VipsInterpolateMethod)( VipsInterpolate *,
PEL *out, REGION *in, double x, double y );
typedef struct _VipsInterpolateClass {
VipsObjectClass parent_class;
/* Write to pixel out(x,y), interpolating from in(x,y). The caller has
* to set the regions up.
*/
VipsInterpolateMethod interpolate;
/* This interpolator needs a window this many pixels across and down.
*/
int (*get_window_size)( VipsInterpolate * );
/* Or just set this if you want a constant.
*/
int window_size;
} VipsInterpolateClass;
GType vips_interpolate_get_type( void );
void vips_interpolate( VipsInterpolate *interpolate,
PEL *out, REGION *in, double x, double y );
VipsInterpolateMethod vips_interpolate_get_method( VipsInterpolate * );
int vips_interpolate_get_window_size( VipsInterpolate *interpolate );
/* How many bits of precision we keep for transformations, ie. how many
* pre-computed matricies we have.
*/
#define VIPS_TRANSFORM_SHIFT (5)
#define VIPS_TRANSFORM_SCALE (1 << VIPS_TRANSFORM_SHIFT)
/* How many bits of precision we keep for interpolation, ie. where the decimal
* is in the fixed-point tables. For 16-bit pixels, we need 16 bits for the
* data and 4 bits to add 16 values together. That leaves 12 bits for the
* fractional part.
*/
#define VIPS_INTERPOLATE_SHIFT (12)
#define VIPS_INTERPOLATE_SCALE (1 << VIPS_INTERPOLATE_SHIFT)
/* Convenience: return static interpolators, no need to unref.
*/
VipsInterpolate *vips_interpolate_nearest_static( void );
VipsInterpolate *vips_interpolate_bilinear_static( void );
VipsInterpolate *vips_interpolate_bicubic_static( void );
/* Convenience: make an interpolator from a nickname. g_object_unref() when
* you're done with it.
*/
VipsInterpolate *vips_interpolate_new( const char *nickname );
/* Register base vips types, called during startup.
*/
void vips__interpolate_init( void );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_INTERPOLATE_H*/

View File

@ -1,50 +0,0 @@
/* i18n stuff for vips.
*/
#ifndef IM_VIPS_INTL_H
#define IM_VIPS_INTL_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
const char *im__gettext( const char *msgid );
const char *im__ngettext( const char *msgid,
const char *plural, unsigned long int n );
#ifdef ENABLE_NLS
#include <libintl.h>
#define _(String) im__gettext(String)
/* ngettext may be defined as a macro if we're optimised.
*/
#ifdef ngettext
#undef ngettext
#endif /*ngettext*/
#define ngettext(String,Plural,number) im__ngettext(String,Plural,number)
#ifdef gettext_noop
#define N_(String) gettext_noop(String)
#else
#define N_(String) (String)
#endif
#else /*!ENABLE_NLS*/
#define _(String) (String)
#define N_(String) (String)
#define textdomain(String) (String)
#define gettext(String) (String)
#define dgettext(Domain,String) (String)
#define dcgettext(Domain,String,Type) (String)
#define bindtextdomain(Domain,Directory) (Domain)
#define bind_textdomain_codeset(Domain,Codeset) (Codeset)
#define ngettext(S, P, N) ((N) == 1 ? (S) : (P))
#define dngettext(D, S, P, N) ngettext(S, P, N)
#endif /* ENABLE_NLS */
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /* IM_VIPS_INTL_H */

View File

@ -1,89 +0,0 @@
/* Metadata API.
*/
/*
Copyright (C) 1991-2005 The National Gallery
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU 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_META_H
#define IM_META_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/* Reserved header names.
*/
#define IM_META_EXIF_NAME "exif-data"
#define IM_META_ICC_NAME "icc-profile-data"
#define IM_META_XML "xml-header"
#define IM_META_RESOLUTION_UNIT "resolution-unit"
/* Types we add for meta fields.
*/
#define IM_TYPE_SAVE_STRING (im_save_string_get_type())
GType im_save_string_get_type( void );
const char *im_save_string_get( const GValue *value );
void im_save_string_set( GValue *value, const char *str );
void im_save_string_setf( GValue *value, const char *fmt, ... )
__attribute__((format(printf, 2, 3)));
#define IM_TYPE_AREA (im_area_get_type())
GType im_area_get_type( void );
#define IM_TYPE_REF_STRING (im_ref_string_get_type())
GType im_ref_string_get_type( void );
int im_ref_string_set( GValue *value, const char *str );
const char *im_ref_string_get( const GValue *value );
size_t im_ref_string_get_length( const GValue *value );
#define IM_TYPE_BLOB (im_blob_get_type())
GType im_blob_get_type( void );
void *im_blob_get( const GValue *value, size_t *data_length );
int im_blob_set( GValue *value, im_callback_fn free_fn,
void *data, size_t length );
int im_meta_set( IMAGE *, const char *field, GValue * );
int im_meta_get( IMAGE *, const char *field, GValue * );
GType im_meta_get_type( IMAGE *im, const char *field );
int im_meta_set_int( IMAGE *, const char *field, int i );
int im_meta_get_int( IMAGE *, const char *field, int *i );
int im_meta_set_double( IMAGE *, const char *field, double d );
int im_meta_get_double( IMAGE *, const char *field, double *d );
int im_meta_set_area( IMAGE *, const char *field, im_callback_fn, void * );
int im_meta_get_area( IMAGE *, const char *field, void **data );
int im_meta_set_string( IMAGE *, const char *field, const char *str );
int im_meta_get_string( IMAGE *, const char *field, char **str );
int im_meta_set_blob( IMAGE *im, const char *field,
im_callback_fn free_fn, void *blob, size_t blob_length );
int im_meta_get_blob( IMAGE *im, const char *field,
void **blob, size_t *blob_length );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*!IM_META_H*/

View File

@ -1,86 +0,0 @@
/* @(#) Local definitions used by the mosaicing program
* @(#) If MAXPOINTS change please ensure that it is still a multiple of
* @(#) AREAS or else AREAS must change as well. Initial setup is for
* @(#) MAXPOINTS = 60, AREAS = 3.
* @(#)
* Copyright: 1990, 1991 N. Dessipris
* Author: Nicos Dessipris
* Written on: 07/11/1989
* Modified on : 29/11/1989
*/
/*
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_MOSAIC_H
#define IM_MOSAIC_H
#define MAXPOINTS 60 /* MAXPOINTS % AREAS (in im_calcon) must be zero */
typedef struct {
char *reference; /* filename of reference */
char *secondary; /* filename of secondary */
int deltax; /* initial estimate of displacement */
int deltay; /* initial estimate of displacement */
int nopoints; /* must be multiple of AREAS and <= MAXPOINTS */
int halfcorsize; /* recommended 5 */
int halfareasize; /* recommended 8 */
/* x, y_reference and contrast found by im_calcon()
*/
int x_reference[MAXPOINTS], y_reference[MAXPOINTS];
int contrast[MAXPOINTS];
/* x, y_secondary and correlation set by im_chkpair()
*/
int x_secondary[MAXPOINTS], y_secondary[MAXPOINTS];
/* returns the corrected best correlation
* as detected in 2*halfareasize+1
* centered at point (x2, y2) and using
* correlation area 2*halfareasize+1
*/
double correlation[MAXPOINTS];
/* Coefficients calculated by im_clinear()
*/
double l_scale, l_angle, l_deltax, l_deltay;
/* used by im_clinear()
*/
double dx[MAXPOINTS], dy[MAXPOINTS];
double deviation[MAXPOINTS];
} TIE_POINTS;
int im_clinear( TIE_POINTS *points );
int im__chkpair( IMAGE *, IMAGE *, TIE_POINTS *point );
int im__initialize( TIE_POINTS *points );
int im__improve( TIE_POINTS *inpoints, TIE_POINTS *outpoints );
int im__avgdxdy( TIE_POINTS *points, int *dx, int *dy );
int im__lrcalcon( IMAGE *ref, TIE_POINTS *points );
int im__tbcalcon( IMAGE *ref, TIE_POINTS *points );
#endif /*IM_MOSAIC_H*/

View File

@ -1,250 +0,0 @@
/* abstract base class for all vips objects
*/
/*
Copyright (C) 1991-2003 The National Gallery
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU 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 VIPS_OBJECT_H
#define VIPS_OBJECT_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
typedef struct _VipsObject VipsObject;
typedef struct _VipsObjectClass VipsObjectClass;
/* Track extra stuff for arguments to objects
*/
/* Flags we associate with each argument.
*/
typedef enum _VipsArgumentFlags {
VIPS_ARGUMENT_NONE = 0,
/* Must be set in the constructor.
*/
VIPS_ARGUMENT_REQUIRED = 1,
/* Can only be set in the constructor.
*/
VIPS_ARGUMENT_CONSTRUCT = 2,
/* Can only be set once.
*/
VIPS_ARGUMENT_SET_ONCE = 4,
/* Have input & output flags. Both set is an error; neither set is OK.
*/
/* Is an input argument (one we depend on) ... if it's a gobject, we
* should ref it. In our _dispose(), we should unref it.
*/
VIPS_ARGUMENT_INPUT = 8,
/* Is an output argument (one that depends on us) ... if it's a
* gobject, we should ref ourselves. We watch "destroy" on the
* argument: if it goes, we unref ourselves. If we dispose, we
* disconnect the signal.
*/
VIPS_ARGUMENT_OUTPUT = 16
} VipsArgumentFlags;
/* Useful flag combinations. User-visible ones are:
VIPS_ARGUMENT_REQURED_INPUT Eg. the "left" argument for an add operation
VIPS_ARGUMENT_OPTIONAL_INPUT Eg. the "caption" for an object
VIPS_ARGUMENT_REQURED_OUTPUT Eg. the "result" of an add operation
VIPS_ARGUMENT_OPTIONAL_OUTPUT Eg. the "width" of an image
Other combinations are used internally, eg. supplying the cast-table for an
arithmetic operation
*/
#define VIPS_ARGUMENT_REQUIRED_INPUT \
(VIPS_ARGUMENT_INPUT | VIPS_ARGUMENT_REQUIRED | \
VIPS_ARGUMENT_CONSTRUCT | VIPS_ARGUMENT_SET_ONCE)
#define VIPS_ARGUMENT_OPTIONAL_INPUT \
(VIPS_ARGUMENT_INPUT | \
VIPS_ARGUMENT_CONSTRUCT | VIPS_ARGUMENT_SET_ONCE)
#define VIPS_ARGUMENT_REQUIRED_OUTPUT \
(VIPS_ARGUMENT_OUTPUT | VIPS_ARGUMENT_REQUIRED | \
VIPS_ARGUMENT_SET_ONCE)
#define VIPS_ARGUMENT_OPTIONAL_OUTPUT \
(VIPS_ARGUMENT_OUTPUT | \
VIPS_ARGUMENT_SET_ONCE)
/* Keep one of these for every argument.
*/
typedef struct _VipsArgument {
GParamSpec *pspec; /* pspec for this argument */
/* More stuff, see below */
} VipsArgument;
/* Keep one of these in the class struct for every argument.
*/
typedef struct _VipsArgumentClass {
VipsArgument parent;
/* The class of the object we are an arg for.
*/
VipsObjectClass *object_class;
VipsArgumentFlags flags;
guint offset; /* G_STRUCT_OFFSET of member in object */
} VipsArgumentClass;
/* Keep one of these in the object struct for every argument instance.
*/
typedef struct _VipsArgumentInstance {
VipsArgument parent;
/* The object we are attached to.
*/
VipsObject *object;
/* Has been set.
*/
gboolean assigned;
/* If this is an output argument, keep the id of our "destroy" handler
* here.
*/
gulong destroy_id;
} VipsArgumentInstance;
/* Need to look up our VipsArgument structs from a pspec. Just hash the
* pointer (ie. we assume pspecs are never shared, is this correct?)
*/
typedef GHashTable VipsArgumentTable;
VipsArgumentInstance *vips__argument_get_instance( VipsArgumentClass *,
VipsObject *);
VipsArgument *vips__argument_table_lookup( VipsArgumentTable *,
GParamSpec *);
typedef void *(*VipsArgumentMapFn)( VipsObject *, GParamSpec *,
VipsArgumentClass *, VipsArgumentInstance *, void *a, void *b );
void *vips_argument_map( VipsObject *object,
VipsArgumentMapFn fn, void *a, void *b );
#define VIPS_TYPE_OBJECT (vips_object_get_type())
#define VIPS_OBJECT( obj ) \
(G_TYPE_CHECK_INSTANCE_CAST( (obj), VIPS_TYPE_OBJECT, VipsObject ))
#define VIPS_OBJECT_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_CAST( (klass), VIPS_TYPE_OBJECT, VipsObjectClass))
#define VIPS_IS_OBJECT( obj ) \
(G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_OBJECT ))
#define VIPS_IS_OBJECT_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_OBJECT ))
#define VIPS_OBJECT_GET_CLASS( obj ) \
(G_TYPE_INSTANCE_GET_CLASS( (obj), VIPS_TYPE_OBJECT, VipsObjectClass ))
struct _VipsObject {
GObject parent_object;
gboolean constructed; /* Construct done and checked */
/* Table of argument instances for this class and any derived classes.
*/
VipsArgumentTable *argument_table;
/* Class properties (see below), duplicated in the instance so we can
* get at them easily via the property system.
*/
char *nickname;
char *description;
};
struct _VipsObjectClass {
GObjectClass parent_class;
/* Build the object ... all argument properties have been set,
* now build the thing.
*/
int (*build)( VipsObject *object );
/* Try to print something about the class, handy for help displays.
*/
void (*print_class)( struct _VipsObjectClass *, VipsBuf * );
/* Try to print something about the object, handy for debugging.
*/
void (*print)( VipsObject *, VipsBuf * );
/* Class nickname, eg. "VipsInterpolateBicubic" has "bicubic" as a
* nickname. Not internationalised.
*/
const char *nickname;
/* Class description. Used for help messages, so internationalised.
*/
const char *description;
/* Table of arguments for this class and any derived classes. Order
* is important, so keep a traverse list too. We can't rely on the
* ordering given by g_object_class_list_properties() since it comes
* from a hash :-(
*/
VipsArgumentTable *argument_table;
GSList *argument_table_traverse;
};
void vips_object_set_property( GObject *gobject,
guint property_id, const GValue *value, GParamSpec *pspec );
void vips_object_get_property( GObject *gobject,
guint property_id, GValue *value, GParamSpec *pspec );
int vips_object_build( VipsObject *object );
void vips_object_print_class( VipsObjectClass *klass );
void vips_object_print( VipsObject *object );
GType vips_object_get_type( void );
void vips_object_class_install_argument( VipsObjectClass *,
GParamSpec *pspec, VipsArgumentFlags flags, guint offset );
typedef void *(*VipsObjectSetArguments)( VipsObject *, void *, void * );
VipsObject *vips_object_new( GType type,
VipsObjectSetArguments set, void *a, void *b );
VipsObject *vips_object_new_from_string( const char *base, const char *str );
void vips_object_to_string( VipsObject *object, VipsBuf *buf );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_OBJECT_H*/

View File

@ -1,773 +0,0 @@
/* @(#) Header file for Birkbeck/VIPS Image Processing Library
* Authors: N. Dessipris, K. Martinez, Birkbeck College, London.
* and J. Cupitt The National Gallery, London.
*
* Sept 94
*
* 15/7/96 JC
* - now does C++ extern stuff
* - many more protos
* 15/4/97 JC
* - protos split out here, more of them
* - still not complete tho' ...
* 8/4/99 JC
* - lots of consts added to please C++
* - and more protos added
* 11/9/06
* - internal protos cut out to help SWIG
*/
/*
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_PROTO_H
#define IM_PROTO_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/* Need these for some protos.
*/
#include <stdarg.h>
#include <sys/types.h>
#include <glib-object.h>
/* If we're being parsed by SWIG, remove gcc attributes.
*/
#ifdef SWIG
# ifndef __attribute__
# define __attribute__(x) /*NOTHING*/
# endif
#endif /*SWIG*/
/* iofuncs
*/
int im_init_world( const char *argv0 );
GOptionGroup *im_get_option_group( void );
/* Turn progress feedback on and off.
*/
void im_progress_set( int progress );
const char *im_error_buffer( void );
int im_debugim( IMAGE * );
int im_printlines( IMAGE * );
int im_header_int( IMAGE *im, const char *field, int *out );
int im_header_double( IMAGE *im, const char *field, double *out );
int im_header_string( IMAGE *im, const char *field, char **out );
GType im_header_get_type( IMAGE *im, const char *field );
int im_header_get( IMAGE *im, const char *field, GValue *value_copy );
typedef void *(*im_header_map_fn)( IMAGE *, const char *, GValue *, void * );
void *im_header_map( IMAGE *im, im_header_map_fn fn, void *a );
const char *im_version_string( void );
int im_version( int flag );
const char *im_guess_prefix( const char *, const char * );
const char *im_guess_libdir( const char *, const char * );
IMAGE *im_init( const char * );
IMAGE *im_openout( const char * );
IMAGE *im_open_vips( const char * );
int im_openin( IMAGE *image );
int im_openinrw( IMAGE *image );
IMAGE *im_vips_open( const char * );
IMAGE *im_setbuf( const char * );
IMAGE *im_partial( const char * );
IMAGE *im_binfile( const char *, int, int, int, int );
IMAGE *im_image( void *, int, int, int, int );
int im_mapfile( IMAGE * );
int im_mapfilerw( IMAGE * );
int im_remapfilerw( IMAGE *image );
IMAGE *im_open( const char *, const char * );
IMAGE *im_open_header( const char * );
int im_image_sanity( IMAGE * );
void *im_malloc( IMAGE *im, size_t sz );
int im_free( void * );
int im_close( IMAGE * );
int im_rwcheck( IMAGE * );
int im_iocheck( IMAGE *, IMAGE * );
int im_incheck( IMAGE * );
int im_outcheck( IMAGE * );
int im_piocheck( IMAGE *, IMAGE * );
int im_pincheck( IMAGE * );
int im_poutcheck( IMAGE * );
int im_cp_desc( IMAGE *, IMAGE * );
int im_cp_descv( IMAGE *out, IMAGE *in1, ... )
__attribute__((sentinel));
int im_cp_desc_array( IMAGE *out, IMAGE *in[] );
int im_setupout( IMAGE * );
int im_writeline( int, IMAGE *, PEL * );
int im_isuint( IMAGE * );
int im_isint( IMAGE * );
int im_isfloat( IMAGE * );
int im_isscalar( IMAGE * );
int im_iscomplex( IMAGE * );
int im_isfile( IMAGE * );
int im_ispartial( IMAGE * );
int im_isMSBfirst( IMAGE * );
int im_amiMSBfirst( void );
int im_ispoweroftwo( int );
int im_check_uncoded( const char *domain, IMAGE *im );
int im_check_bands_1orn( const char *domain, IMAGE *im1, IMAGE *im2 );
int im_check_noncomplex( const char *domain, IMAGE *im );
int im_check_complex( const char *domain, IMAGE *im );
int im_check_size( const char *domain, IMAGE *im1, IMAGE *im2 );
int im_check_bands( const char *domain, IMAGE *im1, IMAGE *im2 );
int im_check_format( const char *domain, IMAGE *im1, IMAGE *im2 );
int im_check_vector( const char *domain, int n, IMAGE *im );
int im_existsf( const char *name, ... )
__attribute__((format(printf, 1, 2)));
int im_isvips( const char * );
int im_add_close_callback( IMAGE *, im_callback_fn, void *, void * );
int im_add_preclose_callback( IMAGE *, im_callback_fn, void *, void * );
int im_add_evalstart_callback( IMAGE *, im_callback_fn, void *, void * );
int im_add_eval_callback( IMAGE *, im_callback_fn, void *, void * );
int im_add_evalend_callback( IMAGE *, im_callback_fn, void *, void * );
int im_add_invalidate_callback( IMAGE *, im_callback_fn, void *, void * );
void error_exit( const char *, ... )
__attribute__((noreturn, format(printf, 1, 2)));
void im_error_clear( void );
void im_verror( const char *domain, const char *fmt, va_list ap );
void im_error( const char *domain, const char *fmt, ... )
__attribute__((format(printf, 2, 3)));
void im_error_system( int err, const char *domain, const char *fmt, ... )
__attribute__((format(printf, 3, 4)));
void im_warn( const char *domain, const char *fmt, ... )
__attribute__((format(printf, 2, 3)));
void im_diag( const char *domain, const char *fmt, ... )
__attribute__((format(printf, 2, 3)));
int im_bits_of_fmt( int );
const char *im_Type2char( int );
const char *im_BandFmt2char( int );
const char *im_Coding2char( int );
const char *im_Compression2char( int );
const char *im_dhint2char( im_demand_type );
const char *im_dtype2char( im_desc_type );
int im_char2Type( const char * );
int im_char2BandFmt( const char * );
int im_char2Coding( const char * );
int im_char2Compression( const char * );
int im_unmapfile( IMAGE * );
void im_printdesc( IMAGE * );
void im_initdesc( IMAGE *,
int, int, int, int, int, int, int, float, float,
int, int );
int im_histlin( IMAGE *image, const char *fmt, ... )
__attribute__((format(printf, 2, 3)));
int im_updatehist( IMAGE *out, const char *name, int argc, char *argv[] );
const char *im_history_get( IMAGE *im );
int im_render( IMAGE *in, IMAGE *out, IMAGE *mask,
int width, int height, int max,
void (*notify)( IMAGE *, Rect *, void * ), void *client );
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_cache( IMAGE *in, IMAGE *out, int width, int height, int max );
/* morphology
*/
int im_dilate( IMAGE *in, IMAGE *out, INTMASK *m );
int im_dilate_raw( IMAGE *in, IMAGE *out, INTMASK *m );
int im_erode( IMAGE *in, IMAGE *out, INTMASK *m );
int im_erode_raw( IMAGE *in, IMAGE *out, INTMASK *m );
int im_cntlines( IMAGE *im, double *nolines, int flag );
int im_profile( IMAGE *in, IMAGE *out, int dir );
/* convolution
*/
void im_copy_dmask_matrix( DOUBLEMASK *mask, double **matrix );
void im_copy_matrix_dmask( double **matrix, DOUBLEMASK *mask );
INTMASK *im_create_imask( const char *, int, int );
INTMASK *im_create_imaskv( const char *, int, int, ... );
DOUBLEMASK *im_create_dmask( const char *, int, int );
DOUBLEMASK *im_create_dmaskv( const char *, int, int, ... );
INTMASK *im_dup_imask( INTMASK *, const char * );
DOUBLEMASK *im_dup_dmask( DOUBLEMASK *, const char * );
int im_free_imask( INTMASK * );
int im_free_dmask( DOUBLEMASK * );
INTMASK *im_read_imask( const char * );
DOUBLEMASK *im_read_dmask( const char * );
void im_print_imask( INTMASK * );
void im_print_dmask( DOUBLEMASK * );
int im_write_imask( INTMASK * );
int im_write_dmask( DOUBLEMASK * );
int im_write_imask_name( INTMASK *, const char * );
int im_write_dmask_name( DOUBLEMASK *, const char * );
INTMASK *im_scale_dmask( DOUBLEMASK *, const char * );
void im_norm_dmask( DOUBLEMASK *mask );
int *im_offsets45( int );
int *im_offsets90( int );
INTMASK *im_rotate_imask90( INTMASK *, const char * );
INTMASK *im_rotate_imask45( INTMASK *, const char * );
DOUBLEMASK *im_rotate_dmask90( DOUBLEMASK *, const char * );
DOUBLEMASK *im_rotate_dmask45( DOUBLEMASK *, const char * );
INTMASK *im_log_imask( const char *, double, double );
DOUBLEMASK *im_log_dmask( const char *, double, double );
INTMASK *im_gauss_imask( const char *, double, double );
INTMASK *im_gauss_imask_sep( const char *, double, double );
DOUBLEMASK *im_gauss_dmask( const char *, double, double );
int im_rank( IMAGE *, IMAGE *, int, int, int );
int im_sharpen( IMAGE *, IMAGE *, int, double, double, double, double, double );
int im_addgnoise( IMAGE *, IMAGE *, double );
int im_gaussnoise( IMAGE *, int, int, double, double );
int im_zerox( IMAGE *, IMAGE *, int );
int im_maxvalue( IMAGE **in, IMAGE *out, int n );
int im_rank_image( IMAGE **in, IMAGE *out, int n, int index );
int im_compass( IMAGE *, IMAGE *, INTMASK * );
int im_gradient( IMAGE *, IMAGE *, INTMASK * );
int im_lindetect( IMAGE *, IMAGE *, INTMASK * );
int im_conv( IMAGE *, IMAGE *, INTMASK * );
int im_conv_raw( IMAGE *, IMAGE *, INTMASK * );
int im_convf( IMAGE *, IMAGE *, DOUBLEMASK * );
int im_convf_raw( IMAGE *, IMAGE *, DOUBLEMASK * );
int im_convsep( IMAGE *, IMAGE *, INTMASK * );
int im_convsep_raw( IMAGE *, IMAGE *, INTMASK * );
int im_convsepf( IMAGE *, IMAGE *, DOUBLEMASK * );
int im_convsepf_raw( IMAGE *, IMAGE *, DOUBLEMASK * );
int im_convsub( IMAGE *, IMAGE *, INTMASK *, int, int );
int im_grad_x( IMAGE *in, IMAGE *out );
int im_grad_y( IMAGE *in, IMAGE *out );
int im_phasecor_fft( IMAGE *in1, IMAGE *in2, IMAGE *out );
int im_fastcor( IMAGE *, IMAGE *, IMAGE * );
int im_fastcor_raw( IMAGE *, IMAGE *, IMAGE * );
int im_spcor( IMAGE *, IMAGE *, IMAGE * );
int im_spcor_raw( IMAGE *, IMAGE *, IMAGE * );
int im_gradcor( IMAGE *, IMAGE *, IMAGE * );
int im_gradcor_raw( IMAGE *, IMAGE *, IMAGE * );
int im_contrast_surface( IMAGE *, IMAGE *, int, int );
int im_contrast_surface_raw( IMAGE *, IMAGE *, int, int );
int im_resize_linear( IMAGE *, IMAGE *, int, int );
int im_mpercent( IMAGE *, double, int * );
int im_shrink( IMAGE *, IMAGE *, double, double );
int im_embed( IMAGE *, IMAGE *, int, int, int, int, int );
int im_stretch3( IMAGE *in, IMAGE *out, double dx, double dy );
int im_rank_raw( IMAGE *in, IMAGE *out, int xsize, int ysize, int n );
/* freq_filt
*/
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 * );
/* arithmetic
*/
DOUBLEMASK *im_measure( IMAGE *, IMAGE_BOX *,
int, int, int *, int, const char * );
DOUBLEMASK *im_stats( IMAGE * );
int im_abs( IMAGE *in, IMAGE *out );
int im_max( IMAGE *in, double *out );
int im_min( IMAGE *in, double *out );
int im_avg( IMAGE *in, double *out );
int im_deviate( IMAGE *in, double *out );
int im_maxpos( IMAGE *in, int *xpos, int *ypos, double *out );
int im_minpos( IMAGE *in, int *xpos, int *ypos, double *out );
int im_maxpos_avg( IMAGE *im, double *xpos, double *ypos, double *out );
int im_maxpos_vec( IMAGE *im, int *xpos, int *ypos, double *maxima, int n );
int im_minpos_vec( IMAGE *im, int *xpos, int *ypos, double *minima, int n );
int im_add( IMAGE *, IMAGE *, IMAGE * );
int im_subtract( IMAGE *, IMAGE *, IMAGE * );
int im_invert( IMAGE *, IMAGE * );
int im_linreg( IMAGE **ins, IMAGE *out, double *xs );
int im_lintra( double, IMAGE *, double, IMAGE * );
int im_lintra_vec( int n, double *a, IMAGE *in, double *b, IMAGE *out );
int im_multiply( IMAGE *, IMAGE *, IMAGE * );
int im_divide( IMAGE *, IMAGE *, IMAGE * );
int im_point_bilinear( IMAGE *im, double x, double y, int band, double *val );
int im_powtra( IMAGE *, IMAGE *, double );
int im_powtra_vec( IMAGE *in, IMAGE *out, int n, double *e );
int im_exptra( IMAGE *, IMAGE * );
int im_exp10tra( IMAGE *, IMAGE * );
int im_expntra( IMAGE *, IMAGE *, double );
int im_expntra_vec( IMAGE *in, IMAGE *out, int n, double *e );
int im_logtra( IMAGE *, IMAGE * );
int im_log10tra( IMAGE *, IMAGE * );
int im_remainder( IMAGE *, IMAGE *, IMAGE * );
int im_remainderconst( IMAGE *, IMAGE *, double );
int im_remainderconst_vec( IMAGE *, IMAGE *, int, double * );
int im_floor( IMAGE *, IMAGE * );
int im_rint( IMAGE *, IMAGE * );
int im_ceil( IMAGE *, IMAGE * );
int im_sintra( IMAGE *, IMAGE * );
int im_sign( IMAGE *in, IMAGE *out );
int im_costra( IMAGE *, IMAGE * );
int im_tantra( IMAGE *, IMAGE * );
int im_asintra( IMAGE *, IMAGE * );
int im_acostra( IMAGE *, IMAGE * );
int im_atantra( IMAGE *, IMAGE * );
int im_cmulnorm( IMAGE *, IMAGE *, IMAGE * );
int im_fav4( IMAGE **, IMAGE * );
int im_gadd( double, IMAGE *, double, IMAGE *, double, IMAGE *);
int im_litecor( IMAGE *, IMAGE *, IMAGE *, int, double );
int im_bandmean( IMAGE *in, IMAGE *out );
int im_cross_phase( IMAGE *a, IMAGE *b, IMAGE *out );
/* boolean
*/
int im_andimage( IMAGE *, IMAGE *, IMAGE * );
int im_andconst( IMAGE *, IMAGE *, double );
int im_and_vec( IMAGE *, IMAGE *, int, double * );
int im_orimage( IMAGE *, IMAGE *, IMAGE * );
int im_orconst( IMAGE *, IMAGE *, double );
int im_or_vec( IMAGE *, IMAGE *, int, double * );
int im_eorimage( IMAGE *, IMAGE *, IMAGE * );
int im_eorconst( IMAGE *, IMAGE *, double );
int im_eor_vec( IMAGE *, IMAGE *, int, double * );
int im_shiftleft( IMAGE *, IMAGE *, int );
int im_shiftright( IMAGE *, IMAGE *, int );
/* cimg
*/
int im_greyc_mask( IMAGE *in, IMAGE *out, IMAGE *mask,
int iterations, float amplitude, float sharpness, float anisotropy,
float alpha, float sigma, float dl, float da, float gauss_prec,
int interpolation, int fast_approx );
/* histogram
*/
int im_maplut( IMAGE *, IMAGE *, IMAGE * );
int im_gammacorrect( IMAGE *, IMAGE *, double );
int im_heq( IMAGE *in, IMAGE *out, int bandno );
int im_hist( IMAGE *in, IMAGE *out, int bandno );
int im_histeq( IMAGE *in, IMAGE *out );
int im_histnorm( IMAGE *in, IMAGE *out );
int im_histcum( IMAGE *in, IMAGE *out );
int im_histgr( IMAGE *in, IMAGE *out, int bandno );
int im_histnD( IMAGE *in, IMAGE *out, int bins );
int im_histplot( IMAGE *hist, IMAGE *histplot );
int im_histspec( IMAGE *hin, IMAGE *href, IMAGE *lut );
int im_hsp( IMAGE *in, IMAGE *ref, IMAGE *out );
int im_identity( IMAGE *lut, int bands );
int im_identity_ushort( IMAGE *lut, int bands, int sz );
int im_lhisteq( IMAGE *in, IMAGE *out, int xwin, int ywin );
int im_lhisteq_raw( IMAGE *in, IMAGE *out, int xwin, int ywin );
int im_invertlut( DOUBLEMASK *input, IMAGE *output, int lut_size );
int im_buildlut( DOUBLEMASK *input, IMAGE *output );
int im_stdif( IMAGE *in, IMAGE *out,
double a, double m0, double b, double s0, int xwin, int ywin );
int im_stdif_raw( IMAGE *in, IMAGE *out,
double a, double m0, double b, double s0, int xwin, int ywin );
int im_tone_build_range( IMAGE *out,
int in_max, int out_max,
double Lb, double Lw, double Ps, double Pm, double Ph,
double S, double M, double H );
int im_tone_build( IMAGE *out,
double Lb, double Lw, double Ps, double Pm, double Ph,
double S, double M, double H );
int im_tone_analyse( IMAGE *in, IMAGE *lut,
double Ps, double Pm, double Ph, double S, double M, double H );
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 );
/* conversion
*/
/* 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 );
DOUBLEMASK *im_vips2mask( IMAGE *, const char * );
int im_mask2vips( DOUBLEMASK *, IMAGE * );
int im_copy_set( IMAGE *, IMAGE *, int, float, float, int, int );
int im_copy_set_meta( IMAGE *in, IMAGE *out, const char *field, GValue *meta );
int im_copy_morph( IMAGE *, IMAGE *, int, int, int );
int im_copy( IMAGE *, IMAGE * );
int im_copy_swap( IMAGE *in, IMAGE *out );
int im_copy_from( IMAGE *in, IMAGE *out, im_arch_type architecture );
int im_extract( IMAGE *, IMAGE *, IMAGE_BOX * );
int im_extract_band( IMAGE *in, IMAGE *out, int band );
int im_extract_bands( IMAGE *in, IMAGE *out, int band, int nbands );
int im_extract_area( IMAGE *in, IMAGE *out, int x, int y, int w, int h );
int im_extract_areabands( IMAGE *in, IMAGE *out,
int left, int top, int width, int height, int band, int nbands );
int im_subsample( IMAGE *, IMAGE *, int, int );
int im_zoom( IMAGE *, IMAGE *, int, int );
int im_bandjoin( IMAGE *, IMAGE *, IMAGE * );
int im_gbandjoin( IMAGE **, IMAGE *, int );
int im_black( IMAGE *, int, int, int );
int im_text( IMAGE *out, const char *text, const char *font,
int width, int alignment, int dpi );
int im_c2amph( IMAGE *, IMAGE * );
int im_c2rect( IMAGE *, IMAGE * );
int im_clip2fmt( IMAGE *in, IMAGE *out, int ofmt );
int im_clip2dcm( IMAGE *, IMAGE * );
int im_clip2cm( IMAGE *, IMAGE * );
int im_clip2us( IMAGE *, IMAGE * );
int im_clip2ui( IMAGE *, IMAGE * );
int im_clip2s( IMAGE *, IMAGE * );
int im_clip2i( IMAGE *, IMAGE * );
int im_clip2d( IMAGE *, IMAGE * );
int im_clip2f( IMAGE *, IMAGE * );
int im_clip2c( IMAGE *, IMAGE * );
int im_clip( IMAGE *, IMAGE * );
int im_ri2c( IMAGE *, IMAGE *, IMAGE * );
int im_c2imag( IMAGE *, IMAGE * );
int im_c2real( IMAGE *, IMAGE * );
int im_c2ps( IMAGE *, IMAGE * );
int im_fliphor( IMAGE *, IMAGE * );
int im_flipver( IMAGE *, IMAGE * );
int im_falsecolour( IMAGE *, IMAGE * );
int im_recomb( IMAGE *, IMAGE *, DOUBLEMASK * );
int im_insert( IMAGE *, IMAGE *, IMAGE *, int, int );
int im_insert_noexpand( IMAGE *, IMAGE *, IMAGE *, int, int );
int im_rot90( IMAGE *, IMAGE * );
int im_rot180( IMAGE *, IMAGE * );
int im_rot270( IMAGE *, IMAGE * );
int im_lrjoin( IMAGE *, IMAGE *, IMAGE * );
int im_tbjoin( IMAGE *, IMAGE *, IMAGE * );
int im_scale( IMAGE *, IMAGE * );
int im_scaleps( IMAGE *, IMAGE * );
int im_slice( IMAGE *, IMAGE *, double, double );
int im_system( IMAGE *im, const char *cmd, char **out );
int im_print( const char *message );
int im_thresh( IMAGE *, IMAGE *, double );
int im_jpeg2vips( const char *, IMAGE * );
int im_vips2jpeg( IMAGE *, const char * );
int im_vips2mimejpeg( IMAGE *, int );
int im_vips2bufjpeg( IMAGE *, IMAGE *, int, char **, int * );
int im_vips2tiff( IMAGE *, const char * );
int im_bernd( const char *, int, int, int, int );
int im_tiff2vips( const char *, IMAGE * );
int im_tile_cache( IMAGE *, IMAGE *, int, int, int );
int im_magick2vips( const char *, IMAGE * );
int im_png2vips( const char *, IMAGE * );
int im_exr2vips( const char *, IMAGE * );
int im_ppm2vips( const char *, IMAGE * );
int im_vips2ppm( IMAGE *, const char * );
int im_analyze2vips( const char *filename, IMAGE *out );
int im_vips2csv( IMAGE *in, const char *filename );
int im_csv2vips( const char *filename, IMAGE *out );
int im_vips2png( IMAGE *, const char * );
int im_raw2vips( const char *filename, IMAGE *out,
int width, int height, int bpp, int offset );
int im_replicate( IMAGE *in, IMAGE *out, int across, int down );
int im_grid( IMAGE *in, IMAGE *out, int tile_height, int across, int down );
int im_msb ( IMAGE * in, IMAGE * out );
int im_msb_band ( IMAGE * in, IMAGE * out, int band );
int im_wrap( IMAGE *in, IMAGE *out, int x, int y );
int im_vips2raw( IMAGE *in, int fd );
/* colour
*/
int im_Lab2LCh( IMAGE *, IMAGE * );
int im_LCh2Lab( IMAGE *, IMAGE * );
int im_LabQ2XYZ( IMAGE *, IMAGE * );
int im_rad2float( IMAGE *, IMAGE * );
int im_float2rad( IMAGE *, IMAGE * );
int im_LCh2UCS( IMAGE *, IMAGE * );
int im_Lab2LCh( IMAGE *, IMAGE * );
int im_Lab2LabQ( IMAGE *, IMAGE * );
int im_Lab2LabS( IMAGE *, IMAGE * );
int im_Lab2XYZ( IMAGE *, IMAGE * );
int im_Lab2XYZ_temp( IMAGE *, IMAGE *, double X0, double Y0, double Z0 );
int im_Lab2UCS( IMAGE *, IMAGE * );
int im_LabQ2Lab( IMAGE *, IMAGE * );
int im_LabQ2LabS( IMAGE *, IMAGE * );
int im_LabS2LabQ( IMAGE *, IMAGE * );
int im_LabS2Lab( IMAGE *, IMAGE * );
int im_UCS2XYZ( IMAGE *, IMAGE * );
int im_UCS2LCh( IMAGE *, IMAGE * );
int im_UCS2Lab( IMAGE *, IMAGE * );
int im_XYZ2Lab( IMAGE *, IMAGE * );
int im_XYZ2Lab_temp( IMAGE *, IMAGE *, double X0, double Y0, double Z0 );
int im_XYZ2UCS( IMAGE *, IMAGE * );
int im_sRGB2XYZ( IMAGE *, IMAGE * );
int im_XYZ2sRGB( IMAGE *, IMAGE * );
int im_Yxy2XYZ( IMAGE *, IMAGE * );
int im_XYZ2Yxy( IMAGE *, IMAGE * );
int im_dECMC_fromLab( IMAGE *, IMAGE *, IMAGE * );
int im_dE_fromXYZ( IMAGE *, IMAGE *, IMAGE * );
int im_dE_fromLab( IMAGE *, IMAGE *, IMAGE * );
void imb_Lab2LCh( float *, float *, int );
void imb_LCh2Lab( float *, float *, int );
void imb_XYZ2Lab_tables( void );
void imb_XYZ2Lab( float *, float *, int, im_colour_temperature * );
void imb_Lab2XYZ( float *, float *, int, im_colour_temperature * );
void imb_LabQ2Lab( PEL *, float *, int );
void imb_Lab2LabQ( float *, PEL *, int );
void imb_LabS2Lab( signed short *, float *, int );
void imb_Lab2LabS( float *, signed short *, int n );
void im_col_make_tables_UCS( void );
float im_col_dECMC( float, float, float, float, float, float );
float im_col_dE00( float, float, float, float, float, float );
int im_lab_morph( IMAGE *in, IMAGE *out,
DOUBLEMASK *mask,
double L_offset, double L_scale,
double a_scale, double b_scale );
/* other
*/
int im_feye( IMAGE *image,
const int xsize, const int ysize, const double factor );
int im_eye( IMAGE *image,
const int xsize, const int ysize, const double factor );
int im_zone( IMAGE *im, int size );
int im_fzone( IMAGE *im, int size );
int im_grey( IMAGE *im, const int xsize, const int ysize );
int im_fgrey( IMAGE *im, const int xsize, const int ysize );
int im_make_xy( IMAGE *out, const int xsize, const int ysize );
int im_benchmarkn( IMAGE *in, IMAGE *out, int n );
int im_benchmark2( IMAGE *in, double *out );
int im_cooc_matrix( IMAGE *im, IMAGE *m,
int xp, int yp, int xs, int ys, int dx, int dy, int flag );
int im_cooc_asm( IMAGE *m, double *asmoment );
int im_cooc_contrast( IMAGE *m, double *contrast );
int im_cooc_correlation( IMAGE *m, double *correlation );
int im_cooc_entropy( IMAGE *m, double *entropy );
int im_glds_matrix( IMAGE *im, IMAGE *m,
int xpos, int ypos, int xsize, int ysize, int dx, int dy );
int im_glds_asm( IMAGE *m, double *asmoment );
int im_glds_contrast( IMAGE *m, double *contrast );
int im_glds_entropy( IMAGE *m, double *entropy );
int im_glds_mean( IMAGE *m, double *mean );
int im_simcontr( IMAGE *image, int xs, int ys );
int im_sines( IMAGE *image,
int xsize, int ysize, double horfreq, double verfreq );
int im_spatres( IMAGE *in, IMAGE *out, int step );
int im_rightshift_size( IMAGE *in, IMAGE *out, int xshift, int yshift, int band_fmt );
/* mosaicing
*/
int im_lrmerge( IMAGE *ref, IMAGE *sec, IMAGE *out,
int dx, int dy, int mwidth );
int im_tbmerge( IMAGE *ref, IMAGE *sec, IMAGE *out,
int dx, int dy, int mwidth );
int im_lrmerge1( IMAGE *ref, IMAGE *sec, IMAGE *out,
int xr1, int yr1, int xs1, int ys1,
int xr2, int yr2, int xs2, int ys2,
int mwidth );
int im_tbmerge1( IMAGE *ref, IMAGE *sec, IMAGE *out,
int xr1, int yr1, int xs1, int ys1,
int xr2, int yr2, int xs2, int ys2,
int mwidth );
int im_lrmosaic( IMAGE *ref, IMAGE *sec, IMAGE *out,
int bandno,
int xref, int yref, int xsec, int ysec,
int halfcorrelation, int halfarea,
int balancetype,
int mwidth );
int im_tbmosaic( IMAGE *ref, IMAGE *sec, IMAGE *out,
int bandno,
int xref, int yref, int xsec, int ysec,
int halfcorrelation, int halfarea,
int balancetype,
int mwidth );
int im_lrmosaic1( IMAGE *ref, IMAGE *sec, IMAGE *out,
int bandno,
int xr1, int yr1, int xs1, int ys1,
int xr2, int yr2, int xs2, int ys2,
int halfcorrelation, int halfarea,
int balancetype,
int mwidth );
int im_tbmosaic1( IMAGE *ref, IMAGE *sec, IMAGE *out,
int bandno,
int xr1, int yr1, int xs1, int ys1,
int xr2, int yr2, int xs2, int ys2,
int halfcorrelation, int halfarea,
int balancetype,
int mwidth );
int im_global_balance( IMAGE *in, IMAGE *out, double gamma );
int im_global_balancef( IMAGE *in, IMAGE *out, double gamma );
int im_match_linear( IMAGE *ref, IMAGE *sec, IMAGE *out,
int xr1, int yr1, int xs1, int ys1,
int xr2, int yr2, int xs2, int ys2 );
int im_match_linear_search( IMAGE *ref, IMAGE *sec, IMAGE *out,
int xr1, int yr1, int xs1, int ys1,
int xr2, int yr2, int xs2, int ys2,
int hwindowsize, int hsearchsize );
int im_affinei( IMAGE *in, IMAGE *out,
VipsInterpolate *interpolate,
double a, double b, double c, double d, double dx, double dy,
int ox, int oy, int ow, int oh );
int im_affinei_all( IMAGE *in, IMAGE *out, VipsInterpolate *interpolate,
double a, double b, double c, double d, double dx, double dy ) ;
int im_correl( IMAGE *ref, IMAGE *sec,
int xref, int yref, int xsec, int ysec,
int hwindowsize, int hsearchsize,
double *correlation, int *x, int *y );
int im_remosaic( IMAGE *in, IMAGE *out,
const char *old_str, const char *new_str );
/* Old stuff, for compat.
*/
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 );
int im_align_bands( IMAGE *in, IMAGE *out );
int im_maxpos_subpel( IMAGE *in, double *x, double *y );
/* inplace
*/
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_flood_blob_copy( IMAGE *in, IMAGE *out, int x, int y, PEL *ink );
int im_lineset( IMAGE *in, IMAGE *out, IMAGE *mask, IMAGE *ink,
int n, int *x1v, int *y1v, int *x2v, int *y2v );
/* relational
*/
int im_equal( IMAGE *, IMAGE *, IMAGE * );
int im_equalconst( IMAGE *, IMAGE *, double );
int im_equal_vec( IMAGE *, IMAGE *, int, double * );
int im_notequal( IMAGE *, IMAGE *, IMAGE * );
int im_notequalconst( IMAGE *, IMAGE *, double );
int im_notequal_vec( IMAGE *, IMAGE *, int, double * );
int im_more( IMAGE *, IMAGE *, IMAGE * );
int im_moreconst( IMAGE *, IMAGE *, double );
int im_more_vec( IMAGE *, IMAGE *, int, double * );
int im_less( IMAGE *, IMAGE *, IMAGE * );
int im_lessconst( IMAGE *, IMAGE *, double );
int im_less_vec( IMAGE *, IMAGE *, int, double * );
int im_moreeq( IMAGE *, IMAGE *, IMAGE * );
int im_moreeqconst( IMAGE *, IMAGE *, double );
int im_moreeq_vec( IMAGE *, IMAGE *, int, double * );
int im_lesseq( IMAGE *, IMAGE *, IMAGE * );
int im_lesseqconst( IMAGE *, IMAGE *, double );
int im_lesseq_vec( IMAGE *, IMAGE *, int, double * );
int im_ifthenelse( IMAGE *, IMAGE *, IMAGE *, IMAGE * );
int im_blend( IMAGE *, IMAGE *, IMAGE *, IMAGE * );
/* matrix
*/
DOUBLEMASK *im_mattrn( DOUBLEMASK *, const char * );
DOUBLEMASK *im_matcat( DOUBLEMASK *, DOUBLEMASK *, const char * );
DOUBLEMASK *im_matmul( DOUBLEMASK *, DOUBLEMASK *, const char * );
DOUBLEMASK *im_lu_decomp( const DOUBLEMASK *mat, const char *name );
int im_lu_solve( const DOUBLEMASK *lu, double *vec );
DOUBLEMASK *im_matinv( const DOUBLEMASK *mat, const char *name );
int im_matinv_inplace( DOUBLEMASK *mat );
int *im_ivector();
float *im_fvector();
double *im_dvector();
void im_free_ivector();
void im_free_fvector();
void im_free_dvector();
int **im_imat_alloc();
float **im_fmat_alloc();
double **im_dmat_alloc();
void im_free_imat();
void im_free_fmat();
void im_free_dmat();
int im_invmat( double **, int );
/* video
*/
int im_video_v4l1( IMAGE *im, const char *device,
int channel, int brightness, int colour, int contrast, int hue,
int ngrabs );
int im_video_test( IMAGE *im, int brightness, int error );
/* 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)));
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_PROTO_H*/

View File

@ -1,88 +0,0 @@
/* r_access.h
*
* 2006-09-21 tcv
* random access to images and regions
*
* 12/5/09
* - add casts to IM__VALUE_FROM_ARRAY() to remove confusion about the type of the result
*/
#ifndef IM_R_ACCESS_H
#define IM_R_ACCESS_H
#include <vips/vips.h>
/** ARRAY MEMBER MACROS **/
/* these are local */
#define IM__TYPE_FROM_ARRAY(type,vptr,i) ( ((type*) (vptr))[i] )
#define IM__CHAR_FROM_ARRAY(vptr,i) IM__TYPE_FROM_ARRAY( gint8, (vptr), (i) )
#define IM__UCHAR_FROM_ARRAY(vptr,i) IM__TYPE_FROM_ARRAY( guint8, (vptr), (i) )
#define IM__SHORT_FROM_ARRAY(vptr,i) IM__TYPE_FROM_ARRAY( gint16, (vptr), (i) )
#define IM__USHORT_FROM_ARRAY(vptr,i) IM__TYPE_FROM_ARRAY( guint16, (vptr), (i) )
#define IM__INT_FROM_ARRAY(vptr,i) IM__TYPE_FROM_ARRAY( gint32, (vptr), (i) )
#define IM__UINT_FROM_ARRAY(vptr,i) IM__TYPE_FROM_ARRAY( guint32, (vptr), (i) )
#define IM__FLOAT_FROM_ARRAY(vptr,i) IM__TYPE_FROM_ARRAY( float, (vptr), (i) )
#define IM__DOUBLE_FROM_ARRAY(vptr,i) IM__TYPE_FROM_ARRAY( double, (vptr), (i) )
#define IM__VALUE_FROM_ARRAY(band_fmt,vptr,i) ( \
( IM_BANDFMT_DOUBLE == (band_fmt) ) ? (double) IM__DOUBLE_FROM_ARRAY( (vptr), (i) ) \
: ( IM_BANDFMT_FLOAT == (band_fmt) ) ? (double) IM__FLOAT_FROM_ARRAY( (vptr), (i) ) \
: ( IM_BANDFMT_INT == (band_fmt) ) ? (double) IM__INT_FROM_ARRAY( (vptr), (i) ) \
: ( IM_BANDFMT_UINT == (band_fmt) ) ? (double) IM__UINT_FROM_ARRAY( (vptr), (i) ) \
: ( IM_BANDFMT_SHORT == (band_fmt) ) ? (double) IM__SHORT_FROM_ARRAY( (vptr), (i) ) \
: ( IM_BANDFMT_USHORT == (band_fmt) ) ? (double) IM__USHORT_FROM_ARRAY( (vptr), (i) ) \
: ( IM_BANDFMT_CHAR == (band_fmt) ) ? (double) IM__CHAR_FROM_ARRAY( (vptr), (i) ) \
: (double) IM__UCHAR_FROM_ARRAY( (vptr), (i) ) )
#define IM__ARRAY_ASSIGNMENT(band_fmt,vptr,i,val) ( \
( IM_BANDFMT_DOUBLE == (band_fmt) ) ? ( IM__DOUBLE_FROM_ARRAY( (vptr), (i) )= (val) ) \
: ( IM_BANDFMT_FLOAT == (band_fmt) ) ? ( IM__FLOAT_FROM_ARRAY( (vptr), (i) )= (val) ) \
: ( IM_BANDFMT_INT == (band_fmt) ) ? ( IM__INT_FROM_ARRAY( (vptr), (i) )= (val) ) \
: ( IM_BANDFMT_UINT == (band_fmt) ) ? ( IM__UINT_FROM_ARRAY( (vptr), (i) )= (val) ) \
: ( IM_BANDFMT_SHORT == (band_fmt) ) ? ( IM__SHORT_FROM_ARRAY( (vptr), (i) )= (val) ) \
: ( IM_BANDFMT_USHORT == (band_fmt) ) ? ( IM__USHORT_FROM_ARRAY( (vptr), (i) )= (val) ) \
: ( IM_BANDFMT_CHAR == (band_fmt) ) ? ( IM__CHAR_FROM_ARRAY( (vptr), (i) )= (val) ) \
: ( IM__UCHAR_FROM_ARRAY( (vptr), (i) )= (val) ) )
#define IM__ARRAY_INCREMENT(band_fmt,vptr,i,val) ( \
( IM_BANDFMT_DOUBLE == (band_fmt) ) ? ( IM__DOUBLE_FROM_ARRAY( (vptr), (i) )+= (val) ) \
: ( IM_BANDFMT_FLOAT == (band_fmt) ) ? ( IM__FLOAT_FROM_ARRAY( (vptr), (i) )+= (val) ) \
: ( IM_BANDFMT_INT == (band_fmt) ) ? ( IM__INT_FROM_ARRAY( (vptr), (i) )+= (val) ) \
: ( IM_BANDFMT_UINT == (band_fmt) ) ? ( IM__UINT_FROM_ARRAY( (vptr), (i) )+= (val) ) \
: ( IM_BANDFMT_SHORT == (band_fmt) ) ? ( IM__SHORT_FROM_ARRAY( (vptr), (i) )+= (val) ) \
: ( IM_BANDFMT_USHORT == (band_fmt) ) ? ( IM__USHORT_FROM_ARRAY( (vptr), (i) )+= (val) ) \
: ( IM_BANDFMT_CHAR == (band_fmt) ) ? ( IM__CHAR_FROM_ARRAY( (vptr), (i) )+= (val) ) \
: ( IM__UCHAR_FROM_ARRAY( (vptr), (i) )+= (val) ) )
/** IMAGE MEMBER MACROS **/
/* export these */
#define IM_IMAGE_VALUE(im,x,y,band) IM__VALUE_FROM_ARRAY( (im)-> BandFmt, \
IM_IMAGE_ADDR( (im), (x), (y) ), (band) )
#define IM_IMAGE_ASSIGNMENT(im,x,y,band,val) IM__ARRAY_ASSIGNMENT( (im)-> BandFmt, \
IM_IMAGE_ADDR( (im), (x), (y) ), (band), (val) )
#define IM_IMAGE_INCREMENT(im,x,y,band,val) IM__ARRAY_INCREMENT( (im)-> BandFmt, \
IM_IMAGE_ADDR( (im), (x), (y) ), (band), (val) )
/** REGION MEMBER MACROS **/
/* export these */
#define IM_REGION_VALUE(reg,x,y,band) IM__VALUE_FROM_ARRAY( (reg)-> im-> BandFmt, \
IM_REGION_ADDR( (reg), (x), (y) ), (band) )
#define IM_REGION_ASSIGNMENT(reg,x,y,band,val) IM__ARRAY_ASSIGNMENT( (reg)-> im-> BandFmt, \
IM_REGION_ADDR( (reg), (x), (y) ), (band), (val) )
#define IM_REGION_INCREMENT(reg,x,y,band,val) IM__ARRAY_INCREMENT( (reg)-> im-> BandFmt, \
IM_REGION_ADDR( (reg), (x), (y) ), (band), (val) )
#endif /* IM_R_ACCESS_H */

View File

@ -1,75 +0,0 @@
/* Simple rectangle algebra.
*/
/*
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_RECT_H
#define IM_RECT_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/* A rectangle.
*/
typedef struct im_rect_struct {
int left, top, width, height;
} Rect;
/* Only define old, broken names if asked.
*/
#ifdef IM_ENABLE_DEPRECATED
/* Useful macros. Compatibility ... see below for new names.
*/
#define right(R) ((R)->left + (R)->width)
#define bottom(R) ((R)->top + (R)->height)
#endif /*IM_ENABLE_DEPRECATED*/
#define IM_RECT_RIGHT(R) ((R)->left + (R)->width)
#define IM_RECT_BOTTOM(R) ((R)->top + (R)->height)
#define IM_RECT_HCENTRE(R) ((R)->left + (R)->width / 2)
#define IM_RECT_VCENTRE(R) ((R)->top + (R)->height / 2)
/* Rectangle algebra functions.
*/
void im_rect_marginadjust( Rect *r, int n );
int im_rect_includespoint( Rect *r, int x, int y );
int im_rect_includesrect( Rect *r1, Rect *r2 );
void im_rect_intersectrect( Rect *r1, Rect *r2, Rect *r3 );
int im_rect_isempty( Rect *r );
void im_rect_unionrect( Rect *r1, Rect *r2, Rect *r3 );
int im_rect_equalsrect( Rect *r1, Rect *r2 );
Rect *im_rect_dup( Rect *r );
void im_rect_normalise( Rect *r );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_RECT_H*/

View File

@ -1,302 +0,0 @@
/* 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_REGION_H
#define IM_REGION_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/* Profiling madness only, who cares about portability.
*/
#ifdef TIME_THREAD
#include <sys/time.h>
#endif /*TIME_THREAD*/
/* Per-thread buffer cache. Held in a GPrivate.
*/
typedef struct im__buffer_cache_t {
GHashTable *hash; /* Hash to im_buffer_cache_list_t* */
GThread *thread; /* Just for sanity checking */
} im_buffer_cache_t;
/* Per-image buffer cache. Hash to this from im_buffer_cache_t.
* We can't store the GSList directly in the hash table, as GHashTable lacks an
* update operation and we'd need to _remove() and _insert() on every list
* operation.
*/
typedef struct im__buffer_cache_list_t {
GSList *buffers; /* GSList of im_buffer_t* */
GThread *thread; /* Just for sanity checking */
IMAGE *im;
im_buffer_cache_t *cache;
} im_buffer_cache_list_t;
/* What we track for each pixel buffer.
*/
typedef struct im__buffer_t {
int ref_count; /* # of regions referencing us */
IMAGE *im; /* IMAGE we are attached to */
Rect area; /* Area this pixel buffer covers */
gboolean done; /* Calculated and in cache */
im_buffer_cache_t *cache;
gboolean invalid; /* Needs to be recalculated */
char *buf; /* Private malloc() area */
size_t bsize; /* Size of private malloc() */
} im_buffer_t;
/* Region types.
*/
typedef enum region_type {
IM_REGION_NONE,
IM_REGION_BUFFER, /* a pixel buffer */
IM_REGION_OTHER_REGION, /* memory on another region */
IM_REGION_OTHER_IMAGE, /* memory on another image */
IM_REGION_WINDOW /* mmap() buffer on fd on another image */
} RegionType;
/* Sub-area of image.
*/
typedef struct region_struct {
/* Users may read these two fields.
*/
IMAGE *im; /* Link back to parent image */
Rect valid; /* Area of parent we can see */
/* The rest of REGION is private.
*/
RegionType type; /* What kind of attachment */
char *data; /* Off here to get data */
int bpl; /* Bytes-per-line for data */
void *seq; /* Sequence we are using to fill region */
/* The thread that made this region. Used to assert() test that
* regions are not being shared between threads.
*/
GThread *thread;
/* Ref to the window we use for this region, if any.
*/
im_window_t *window;
/* Ref to the buffer we use for this region, if any.
*/
im_buffer_t *buffer;
} REGION;
/* Private to iofuncs: the size of the `tiles' requested by im_generate()
* when acting as a data sink.
*/
#define IM__TILE_WIDTH (64)
#define IM__TILE_HEIGHT (64)
/* The height of the strips for the other two request styles.
*/
#define IM__THINSTRIP_HEIGHT (1)
#define IM__FATSTRIP_HEIGHT (16)
/* Functions on regions.
*/
void im__region_take_ownership( REGION *reg );
void im__region_check_ownership( REGION *reg );
void im__region_no_ownership( REGION *reg );
REGION *im_region_create( IMAGE *im );
void im_region_free( REGION *reg );
int im_region_buffer( REGION *reg, Rect *r );
int im_region_image( REGION *reg, Rect *r );
int im_region_region( REGION *reg, REGION *to, Rect *r, int x, int y );
int im_region_equalsregion( REGION *reg1, REGION *reg2 );
int im_region_position( REGION *reg1, int x, int y );
typedef int (*im_region_fill_fn)( REGION *, void * );
int im_region_fill( REGION *reg, Rect *r, im_region_fill_fn fn, void *a );
void im_region_print( REGION *region );
/* IMAGE functions which use regions.
*/
typedef void *(*im_start_fn)( IMAGE *, void *, void * );
typedef int (*im_generate_fn)( REGION *, void *, void *, void *);
typedef int (*im_stop_fn)( void *, void *, void * );
int im_prepare( REGION *reg, Rect *r );
int im_prepare_many( REGION **reg, Rect *r );
int im_prepare_to( REGION *reg, REGION *dest, Rect *r, int x, int y );
int im_generate( IMAGE *im,
im_start_fn start, im_generate_fn generate, im_stop_fn stop,
void *a, void *b
);
int im_iterate( IMAGE *im,
im_start_fn start, im_generate_fn generate, im_stop_fn stop,
void *a, void *b
);
void im__copy_region( REGION *reg, REGION *dest, Rect *r, int x, int y );
/* Convenience functions for im_generate()/im_iterate().
*/
void *im_start_one( IMAGE *out, void *in, void *dummy );
int im_stop_one( void *seq, void *dummy1, void *dummy2 );
void *im_start_many( IMAGE *out, void *in, void *dummy );
int im_stop_many( void *seq, void *dummy1, void *dummy2 );
IMAGE **im_allocate_input_array( IMAGE *out, ... );
int im_demand_hint( IMAGE *im, im_demand_type hint, ... )
__attribute__((sentinel));
int im_demand_hint_array( IMAGE *im, im_demand_type hint, IMAGE **in );
void im_free_region_array( REGION **regs );
REGION **im_allocate_region_array( IMAGE *im, int count );
void im__find_demand_size( IMAGE *im, int *pw, int *ph );
/* Buffer processing.
*/
typedef void (*im_wrapone_fn)( void *in, void *out, int width,
void *a, void *b );
typedef void (*im_wraptwo_fn)( void *in1, void *in2, void *out,
int width, void *a, void *b );
typedef void (*im_wrapmany_fn)( void **in, void *out, int width,
void *a, void *b );
int im_wrapone( IMAGE *in, IMAGE *out,
im_wrapone_fn fn, void *a, void *b );
int im_wraptwo( IMAGE *in1, IMAGE *in2, IMAGE *out,
im_wraptwo_fn fn, void *a, void *b );
int im_wrapmany( IMAGE **in, IMAGE *out,
im_wrapmany_fn fn, void *a, void *b );
/* Internal VIPS functions shared by partials.
*/
int im__call_start( REGION *reg );
void im__call_stop( REGION *reg );
/* window manager.
*/
im_window_t *im_window_ref( IMAGE *im, int top, int height );
int im_window_unref( im_window_t *window );
void im_window_print( im_window_t *window );
/* buffer manager.
*/
void im_buffer_done( im_buffer_t *buffer );
void im_buffer_undone( im_buffer_t *buffer );
void im_buffer_unref( im_buffer_t *buffer );
im_buffer_t *im_buffer_ref( IMAGE *im, Rect *area );
im_buffer_t *im_buffer_unref_ref( im_buffer_t *buffer, IMAGE *im, Rect *area );
void im_buffer_print( im_buffer_t *buffer );
void im_invalidate( IMAGE *im );
/* Only define if IM_ENABLE_DEPRECATED is set.
*/
#ifdef IM_ENABLE_DEPRECATED
/* Compatibilty macros ... delete soon. See below for the new names.
*/
/* Macros on REGIONs.
* lskip() add to move down line
* nele() number of elements across region
* rsize() sizeof width of region
* addr() address of pixel in region
*/
#define lskip(B) ((B)->bpl)
#define nele(B) ((B)->valid.width*(B)->im->Bands)
#define rsize(B) ((B)->valid.width*psize((B)->im))
/* addr() is special: if DEBUG is defined, make an addr() with bounds checking.
*/
#ifdef DEBUG
#define addr(B,X,Y) \
( (im_rect_includespoint( &(B)->valid, (X), (Y) ))? \
((B)->data + ((Y) - (B)->valid.top)*lskip(B) + \
((X) - (B)->valid.left)*psize((B)->im)): \
(fprintf( stderr, \
"addr: point out of bounds, file \"%s\", line %d\n" \
"(point x=%d, y=%d\n" \
" should have been within Rect left=%d, top=%d, " \
"width=%d, height=%d)\n", \
__FILE__, __LINE__, \
(X), (Y), \
(B)->valid.left, \
(B)->valid.top, \
(B)->valid.width, \
(B)->valid.height ), abort(), (char *) NULL) \
)
#else /*DEBUG*/
#define addr(B,X,Y) ((B)->data + ((Y)-(B)->valid.top)*lskip(B) + \
((X)-(B)->valid.left)*psize((B)->im))
#endif /*DEBUG*/
#endif /*IM_ENABLE_DEPRECATED*/
/* Macros on REGIONs.
* IM_REGION_LSKIP() add to move down line
* IM_REGION_N_ELEMENTS() number of elements across region
* IM_REGION_SIZEOF_LINE() sizeof width of region
* IM_REGION_ADDR() address of pixel in region
*/
#define IM_REGION_LSKIP(R) ((R)->bpl)
#define IM_REGION_N_ELEMENTS(R) ((R)->valid.width*(R)->im->Bands)
#define IM_REGION_SIZEOF_LINE(R) \
((R)->valid.width * IM_IMAGE_SIZEOF_PEL((R)->im))
/* If DEBUG is defined, add bounds checking.
*/
#ifdef DEBUG
#define IM_REGION_ADDR(B,X,Y) \
( (im_rect_includespoint( &(B)->valid, (X), (Y) ))? \
((B)->data + ((Y) - (B)->valid.top)*IM_REGION_LSKIP(B) + \
((X) - (B)->valid.left)*IM_IMAGE_SIZEOF_PEL((B)->im)): \
(fprintf( stderr, \
"IM_REGION_ADDR: point out of bounds, " \
"file \"%s\", line %d\n" \
"(point x=%d, y=%d\n" \
" should have been within Rect left=%d, top=%d, " \
"width=%d, height=%d)\n", \
__FILE__, __LINE__, \
(X), (Y), \
(B)->valid.left, \
(B)->valid.top, \
(B)->valid.width, \
(B)->valid.height ), abort(), (char *) NULL) \
)
#else /*DEBUG*/
#define IM_REGION_ADDR(B,X,Y) \
((B)->data + \
((Y)-(B)->valid.top) * IM_REGION_LSKIP(B) + \
((X)-(B)->valid.left) * IM_IMAGE_SIZEOF_PEL((B)->im))
#endif /*DEBUG*/
#define IM_REGION_ADDR_TOPLEFT(B) ( (B)->data )
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_REGION_H*/

View File

@ -1,64 +0,0 @@
/* Definitions for thread support.
*
* JC, 9/5/94
* 30/7/99 RP, JC
* - reworked for posix/solaris threads
* 28/9/99 JC
* - restructured, made part of public API
*/
/*
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_SEMAPHORE_H
#define IM_SEMAPHORE_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/* Implement our own semaphores.
*/
typedef struct {
char *name;
int v;
GMutex *mutex;
GCond *cond;
} im_semaphore_t;
int im_semaphore_up( im_semaphore_t *s );
int im_semaphore_down( im_semaphore_t *s );
int im_semaphore_upn( im_semaphore_t *s, int n );
int im_semaphore_downn( im_semaphore_t *s, int n );
void im_semaphore_destroy( im_semaphore_t *s );
void im_semaphore_init( im_semaphore_t *s, int v, char *name );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_SEMAPHORE_H*/

View File

@ -1,44 +0,0 @@
/* Header file for structures using the mosaicing programs */
/*
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_STRUCT_H
#define IM_STRUCT_H
typedef struct {
char *reference, *secondary;
int nopoints;
float *xref, *yref, *xsec, *ysec;
} CNTRL_POINTS;
typedef struct {
char *reference, *secondary;
float scale, angle, deltax, deltay;
float Xcoef[6], Ycoef[6];
} MERGE_PARAM;
#endif /*IM_STRUCT_H*/

View File

@ -1,77 +0,0 @@
/* Private include file ... if we've been configured without gthread, we need
* to point the g_thread_*() and g_mutex_*() functions at our own stubs.
*/
/*
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_THREAD_H
#define IM_THREAD_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#ifndef HAVE_THREADS
#undef g_thread_supported
#define g_thread_supported() (0)
#define g_thread_init im__g_thread_init
#define g_thread_join im__g_thread_join
#define g_thread_self im__g_thread_self
#define g_thread_create_full im__g_thread_create_full
/* We don't need a shadow imlementation of g_thread_create(), even though we
* use it, because it's just a macro over g_thread_create_full().
*/
void im__g_thread_init( GThreadFunctions *vtable );
gpointer im__g_thread_join( GThread * );
gpointer im__g_thread_self( void );
GThread *im__g_thread_create_full( GThreadFunc,
gpointer, gulong, gboolean, gboolean, GThreadPriority, GError ** );
#undef g_mutex_new
#undef g_mutex_free
#undef g_mutex_lock
#undef g_mutex_unlock
#define g_mutex_new im__g_mutex_new
#define g_mutex_free im__g_mutex_free
#define g_mutex_lock im__g_mutex_lock
#define g_mutex_unlock im__g_mutex_unlock
GMutex *im__g_mutex_new( void );
void im__g_mutex_free( GMutex * );
void im__g_mutex_lock( GMutex * );
void im__g_mutex_unlock( GMutex * );
#endif /*!HAVE_THREADS*/
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_THREAD_H*/

View File

@ -1,131 +0,0 @@
/* Thread eval for VIPS.
*
* 29/9/99 JC
* - from thread.h
*/
/*
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_THREADGROUP_H
#define IM_THREADGROUP_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#include <vips/semaphore.h>
/* Stack size for each thread. Need to set this explicitly because some
* systems have a very low default.
FIXME ... should have an environment variable for this?
*/
#define IM__DEFAULT_STACK_SIZE (2 * 1024 * 1024)
/* A work function.
*/
typedef int (*im__work_fn)( REGION *, void *, void *, void * );
/* What we track for each thread.
*/
typedef struct {
REGION *reg; /* Region this thread operates on */
struct im__threadgroup_t *tg; /* Thread group we are part of */
GThread *thread; /* Thread for this region */
im_semaphore_t go; /* Thread waits here to start work */
int kill; /* Set this to make thread exit */
int error; /* Set by thread if work fn fails */
REGION *oreg; /* If part of an inplace threadgroup, */
Rect pos; /* where this thread should write */
int x, y; /* it's result */
void *a, *b, *c; /* User arguments to work fns */
#ifdef TIME_THREAD
hrtime_t *btime, *etime;
int tpos;
#endif /*TIME_THREAD*/
} im_thread_t;
/* What we track for a group of threads working together.
*/
typedef struct im__threadgroup_t {
int zombie; /* Set if has been freed */
IMAGE *im; /* Image we are calculating */
int pw, ph; /* Tile size */
int nlines; /* Scanlines-at-once we prefer for iteration */
im__work_fn work; /* Work fn for this threadgroup */
int inplace; /* Regions should be contiguous */
int nthr; /* Number of threads in group */
im_thread_t **thr; /* Threads */
im_semaphore_t idle_sem;/* The number of idle threads */
GSList *idle; /* All the idle threads */
GMutex *idle_lock;
#ifdef DEBUG_HIGHWATER
int nidle; /* Number of idles */
int min_idle; /* How short idle got */
#endif /*DEBUG_HIGHWATER*/
int kill; /* Set this to stop threadgroup early */
int progress; /* Set this to get eval progress feedback */
} im_threadgroup_t;
void im_concurrency_set( int concurrency );
int im_concurrency_get( void );
/* Thread group functions.
*/
im_threadgroup_t *im_threadgroup_create( IMAGE *im );
int im_threadgroup_free( im_threadgroup_t *tg );
im_thread_t *im_threadgroup_get( im_threadgroup_t *tg );
void im_threadgroup_wait( im_threadgroup_t *tg );
int im_threadgroup_iserror( im_threadgroup_t *tg );
void im_threadgroup_trigger( im_thread_t *thr );
/* Threaded im_prepare()
*/
int im_prepare_thread( im_threadgroup_t *tg, REGION *oreg, Rect *r );
/* Threaded, double-buffered eval to file.
*/
typedef int (*im_wbuffer_fn)( REGION *region, Rect *area, void *a, void *b );
int im_wbuffer( im_threadgroup_t *tg,
im_wbuffer_fn write_fn, void *a, void *b );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_THREADGROUP_H*/

View File

@ -1,69 +0,0 @@
/* Affine transforms.
*/
/*
Copyright (C) 1991-2003 The National Gallery
This program 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
*/
/* Params for an affine transformation.
*/
typedef struct {
/* Area of input we can use. This can be smaller than the real input
* image: we expand the input to add extra pixels for interpolation.
*/
Rect iarea;
/* The area of the output we've been asked to generate. left/top can
* be negative.
*/
Rect oarea;
/* The transform.
*/
double a, b, c, d;
double dx, dy;
double ia, ib, ic, id; /* Inverse of matrix abcd */
} Transformation;
void im__transform_init( Transformation *trn );
int im__transform_calc_inverse( Transformation *trn );
int im__transform_isidentity( const Transformation *trn );
int im__transform_add( const Transformation *in1, const Transformation *in2,
Transformation *out );
void im__transform_print( const Transformation *trn );
void im__transform_forward_point( const Transformation *trn,
const double x, const double y, double *ox, double *oy );
void im__transform_invert_point( const Transformation *trn,
const double x, const double y, double *ox, double *oy );
void im__transform_forward_rect( const Transformation *trn,
const Rect *in, Rect *out );
void im__transform_invert_rect( const Transformation *trn,
const Rect *in, Rect *out );
void im__transform_set_area( Transformation * );
int im__affine( IMAGE *in, IMAGE *out, Transformation *trn );

View File

@ -1,148 +0,0 @@
/* VIPS argument types
*/
/*
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_TYPE_H
#define IM_TYPE_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/* Type names. Old code might use "doublevec" etc. from before we had the
* "array" type.
*/
#define IM_TYPE_NAME_DOUBLE "double" /* im_value_t is ptr to double */
#define IM_TYPE_NAME_INT "integer" /* 32-bit integer */
#define IM_TYPE_NAME_COMPLEX "complex" /* Pair of doubles */
#define IM_TYPE_NAME_STRING "string" /* Zero-terminated char array */
#define IM_TYPE_NAME_IMASK "intmask" /* Integer mask type */
#define IM_TYPE_NAME_DMASK "doublemask" /* Double mask type */
#define IM_TYPE_NAME_IMAGE "image" /* IMAGE descriptor */
#define IM_TYPE_NAME_DISPLAY "display" /* Display descriptor */
#define IM_TYPE_NAME_GVALUE "gvalue" /* GValue wrapper */
#define IM_TYPE_NAME_ARRAY "array" /* Array of other values of some type */
/* Handy type lookups.
*/
#define IM_TYPE_IM (im_type_lookup( IM_TYPE_NAME_IMAGE, NULL ))
#define IM_TYPE_AR( OF ) (im_type_lookup( IM_TYPE_NAME_ARRAY, OF ))
/* A VIPS type.
*/
typedef struct im__type_t {
const char *name; /* Name of type, eg. "double" */
struct im__type_t *type_param; /* What this is an array of */
size_t size; /* sizeof( im_value_t ) repres. ) */
} im_type_t;
/* Pass (array of pointers to im_value_t) to operations as the argument list.
* Cast to the appropriate type for this argument, eg. (int *) or (IMAGE *).
*/
typedef void im_value_t;
/* Various im_value_t values.
*/
typedef struct {
char *name; /* Command-line name in */
void *mask; /* Mask --- DOUBLE or INT */
} im_value_mask_t;
typedef struct {
int n; /* Array length */
im_value_t **array; /* Array */
} im_value_array_t;
/* Flags for arguments.
* operation,
*/
typedef enum {
IM_ARGUMENT_NONE = 0, /* No flags set */
IM_ARGUMENT_OUTPUT = 0x1 /* Is an output arg */
} im_argument_flags;
/* An argument to a VIPS operation.
*/
typedef struct im__argument_t {
const char *name; /* Eg. "in2" */
im_type_t *type; /* Argument type */
im_argument_flags flags; /* Output/input etc. */
} im_argument_t;
/* Flags for operations. Various hints for UIs about the behaviour of the
* operation,
*/
typedef enum {
IM_OPERATION_NONE = 0, /* No flags set */
IM_OPERATION_PIO = 0x1, /* Is a partial function */
IM_OPERATION_TRANSFORM = 0x2, /* Performs coord transformations */
IM_OPERATION_PTOP = 0x4, /* Point-to-point ... can be LUTted */
IM_OPERATION_NOCACHE = 0x8 /* Result should not be cached */
} im_operation_flags;
/* Type of a VIPS dispatch funtion.
*/
typedef int (*im_operation_dispatch_fn)( im_value_t **argv );
/* A VIPS operation.
*/
typedef struct im__operation_t {
const char *name; /* eg "im_invert" */
const char *desc; /* One line description */
im_operation_flags flags; /* Flags for this function */
im_operation_dispatch_fn disp; /* Dispatch */
int argc; /* Number of args */
im_argument_t **argv; /* Arg list */
} im_operation_t;
/* Register/iterate over types.
*/
im_type_t *im_type_register( const char *name,
im_type_t *type_param, size_t size );
void *im_type_map( VSListMap2Fn fn, void *a, void *b );
im_type_t *im_type_lookup( const char *name, im_type_t *type_param );
/* Register/iterate/lookup operations.
*/
im_operation_t *im_operation_register( const char *name, const char *desc,
im_operation_flags flags, im_operation_dispatch_fn disp, int argc );
im_operation_t *im_operation_registerv( const char *name, const char *desc,
im_operation_flags flags, im_operation_dispatch_fn disp, ... );
void *im_operation_map( VSListMap2Fn fn, void *a, void *b );
im_operation_t *im_operation_lookup( const char *name );
/* Create arguments.
*/
im_argument_t *im_argument_new( const char *name,
im_type_t *type, im_argument_flags flags );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_TYPE_H*/

View File

@ -1,373 +0,0 @@
/* Various useful definitions.
*
* J.Cupitt, 8/4/93
* 15/7/96 JC
* - C++ stuff added
*/
/*
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_UTIL_H
#define IM_UTIL_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#include <stdio.h>
/* Some platforms don't have M_PI in math.h :-(
*/
#define IM_PI (3.14159265358979323846)
/* Only define if IM_ENABLE_DEPRECATED is set.
*/
#ifdef IM_ENABLE_DEPRECATED
#ifndef MAX
#define MAX(A,B) ((A)>(B)?(A):(B))
#define MIN(A,B) ((A)<(B)?(A):(B))
#endif /*MAX*/
#define CLIP(A,V,B) MAX( (A), MIN( (B), (V) ) )
#define NEW(IM,A) ((A *)im_malloc((IM),sizeof(A)))
#define NUMBER(R) (sizeof(R)/sizeof(R[0]))
#define ARRAY(IM,N,T) ((T *)im_malloc((IM),(N) * sizeof(T)))
/* Duff's device. Do OPERation N times in a 16-way unrolled loop.
*/
#define UNROLL( N, OPER ) { \
if( (N) ) { \
int duff_count = ((N) + 15) / 16; \
\
switch( (N) % 16 ) { \
case 0: do { OPER; \
case 15: OPER; \
case 14: OPER; \
case 13: OPER; \
case 12: OPER; \
case 11: OPER; \
case 10: OPER; \
case 9: OPER; \
case 8: OPER; \
case 7: OPER; \
case 6: OPER; \
case 5: OPER; \
case 4: OPER; \
case 3: OPER; \
case 2: OPER; \
case 1: OPER; \
} while( --duff_count > 0 ); \
} \
} \
}
/* Round a float to the nearest integer. This should give an identical result
* to the math.h rint() function (and the old SunOS nint() function), but be
* much faster. Beware: it evaluates its argument more than once, so don't use
* ++!
*/
#define RINT( R ) ((int)((R)>0?((R)+0.5):((R)-0.5)))
/* Various integer range clips. Record over/under flows.
*/
#define CLIP_UCHAR( V, SEQ ) { \
if( (V) & (UCHAR_MAX ^ -1) ) { \
if( (V) < 0 ) { \
(SEQ)->underflow++; \
(V) = 0; \
} \
if( (V) > UCHAR_MAX ) { \
(SEQ)->overflow++; \
(V) = UCHAR_MAX; \
} \
} \
}
#define CLIP_USHORT( V, SEQ ) { \
if( (V) & (USHRT_MAX ^ -1) ) { \
if( (V) < 0 ) { \
(SEQ)->underflow++; \
(V) = 0; \
} \
if( (V) > USHRT_MAX ) { \
(SEQ)->overflow++; \
(V) = USHRT_MAX; \
} \
} \
}
#define CLIP_CHAR( V, SEQ ) { \
if( (V) < SCHAR_MIN ) { \
(SEQ)->underflow++; \
(V) = SCHAR_MIN; \
} \
if( (V) > SCHAR_MAX ) { \
(SEQ)->overflow++; \
(V) = SCHAR_MAX; \
} \
}
#define CLIP_SHORT( V, SEQ ) { \
if( (V) < SHRT_MIN ) { \
(SEQ)->underflow++; \
(V) = SHRT_MIN; \
} \
if( (V) > SHRT_MAX ) { \
(SEQ)->overflow++; \
(V) = SHRT_MAX; \
} \
}
#define CLIP_NONE( V, SEQ ) {}
#endif /*IM_ENABLE_DEPRECATED*/
#define IM_MAX(A,B) ((A)>(B)?(A):(B))
#define IM_MIN(A,B) ((A)<(B)?(A):(B))
#define IM_ABS(x) (((x) >= 0) ? (x) : -(x))
#define IM_CLIP(A,V,B) IM_MAX( (A), IM_MIN( (B), (V) ) )
#define IM_NEW(IM,A) ((A *)im_malloc((IM),sizeof(A)))
#define IM_NUMBER(R) ((int)(sizeof(R)/sizeof(R[0])))
#define IM_ARRAY(IM,N,T) ((T *)im_malloc((IM),(N) * sizeof(T)))
#define IM_FREEF( F, S ) do { \
if( S ) { \
(void) F( (S) ); \
(S) = 0; \
} \
} while( 0 )
/* Can't just use IM_FREEF(), we want the extra cast to void on the argument
* to im_free() to make sure we can work for "const char *" variables.
*/
#define IM_FREE( S ) do { \
if( S ) { \
(void) im_free( (void *) (S) ); \
(S) = 0; \
} \
} while( 0 )
#define IM_SETSTR( S, V ) do { \
const char *sst = (V); \
\
if( (S) != sst ) { \
if( !(S) || !sst || strcmp( (S), sst ) != 0 ) { \
IM_FREE( S ); \
if( sst ) \
(S) = im_strdup( NULL, sst ); \
} \
} \
} while( 0 )
/* Duff's device. Do OPERation N times in a 16-way unrolled loop.
*/
#define IM_UNROLL( N, OPER ) { \
if( (N) ) { \
int duff_count = ((N) + 15) / 16; \
\
switch( (N) % 16 ) { \
case 0: do { OPER; \
case 15: OPER; \
case 14: OPER; \
case 13: OPER; \
case 12: OPER; \
case 11: OPER; \
case 10: OPER; \
case 9: OPER; \
case 8: OPER; \
case 7: OPER; \
case 6: OPER; \
case 5: OPER; \
case 4: OPER; \
case 3: OPER; \
case 2: OPER; \
case 1: OPER; \
} while( --duff_count > 0 ); \
} \
} \
}
/* Round a float to the nearest integer. This should give an identical result
* to the math.h rint() function (and the old SunOS nint() function), but be
* much faster. Beware: it evaluates its argument more than once, so don't use
* ++!
*/
#define IM_RINT( R ) ((int)((R)>0?((R)+0.5):((R)-0.5)))
/* Various integer range clips. Record over/under flows.
*/
#define IM_CLIP_UCHAR( V, SEQ ) { \
if( (V) < 0 ) { \
(SEQ)->underflow++; \
(V) = 0; \
} \
else if( (V) > UCHAR_MAX ) { \
(SEQ)->overflow++; \
(V) = UCHAR_MAX; \
} \
}
#define IM_CLIP_USHORT( V, SEQ ) { \
if( (V) < 0 ) { \
(SEQ)->underflow++; \
(V) = 0; \
} \
else if( (V) > USHRT_MAX ) { \
(SEQ)->overflow++; \
(V) = USHRT_MAX; \
} \
}
#define IM_CLIP_CHAR( V, SEQ ) { \
if( (V) < SCHAR_MIN ) { \
(SEQ)->underflow++; \
(V) = SCHAR_MIN; \
} \
else if( (V) > SCHAR_MAX ) { \
(SEQ)->overflow++; \
(V) = SCHAR_MAX; \
} \
}
#define IM_CLIP_SHORT( V, SEQ ) { \
if( (V) < SHRT_MIN ) { \
(SEQ)->underflow++; \
(V) = SHRT_MIN; \
} \
else if( (V) > SHRT_MAX ) { \
(SEQ)->overflow++; \
(V) = SHRT_MAX; \
} \
}
#define IM_CLIP_NONE( V, SEQ ) {}
/* Now implemented as macros.
*/
#define im_open_local( IM, NAME, MODE ) \
((IMAGE *) im_local( (IM), \
(im_construct_fn) im_open, (im_callback_fn) im_close, \
(void *) (NAME), (void *) (MODE), NULL ))
/* Strange double cast stops bogus warnings from gcc 4.1
*/
#define im_open_local_array( IM, OUT, N, NAME, MODE ) \
(im_local_array( (IM), (void **)((void*)(OUT)), (N),\
(im_construct_fn) im_open, (im_callback_fn) im_close, \
(void *) (NAME), (void *) (MODE), NULL ))
/* Basic function types.
*/
typedef int (*im_callback_fn)( void *, void * );
typedef void *(*im_construct_fn)( void *, void *, void * );
/* strtok replacement.
*/
char *im__break_token( char *str, char *brk );
/* Like GFunc, but return a value.
*/
typedef void *(*VSListMap2Fn)( void *, void *, void * );
typedef void *(*VSListMap4Fn)( void *, void *, void *, void *, void * );
typedef void *(*VSListFold2Fn)( void *, void *, void *, void * );
gboolean im_slist_equal( GSList *l1, GSList *l2 );
void *im_slist_map2( GSList *list, VSListMap2Fn fn, void *a, void *b );
void *im_slist_map2_rev( GSList *list, VSListMap2Fn fn, void *a, void *b );
void *im_slist_map4( GSList *list,
VSListMap4Fn fn, void *a, void *b, void *c, void *d );
void *im_slist_fold2( GSList *list, void *start,
VSListFold2Fn fn, void *a, void *b );
GSList *im_slist_filter( GSList *list, VSListMap2Fn fn, void *a, void *b );
void im_slist_free_all( GSList *list );
void *im_map_equal( void *a, void *b );
void *im_hash_table_map( GHashTable *hash, VSListMap2Fn fn, void *a, void *b );
typedef void *(*VipsTypeMap)( GType, void * );
typedef void *(*VipsTypeMap2)( GType, void *, void * );
typedef void *(*VipsClassMap)( VipsObjectClass *, void * );
void *vips_type_map( GType base, VipsTypeMap2 fn, void *a, void *b );
void *vips_type_map_concrete_all( GType base, VipsTypeMap fn, void *a );
void *vips_class_map_concrete_all( GType base, VipsClassMap fn, void *a );
VipsObjectClass *vips_class_find( const char *basename, const char *nickname );
GType vips_type_find( const char *basename, const char *nickname );
char *im_strncpy( char *dest, const char *src, int n );
char *im_strrstr( const char *haystack, const char *needle );
char *im_strdup( IMAGE *im, const char *str );
gboolean im_ispostfix( const char *a, const char *b );
gboolean im_isprefix( const char *a, const char *b );
int im_vsnprintf( char *str, size_t size, const char *format, va_list ap );
int im_snprintf( char *str, size_t size, const char *format, ... )
__attribute__((format(printf, 3, 4)));
char *im_break_token( char *str, const char *brk );
const char *im_skip_dir( const char *filename );
void im_filename_split( const char *path, char *name, char *mode );
void im_filename_suffix( const char *path, char *suffix );
int im_filename_suffix_match( const char *path, const char *suffixes[] );
char *im_getnextoption( char **in );
char *im_getsuboption( const char *buf );
void *im_local( IMAGE *im,
im_construct_fn cons, im_callback_fn dest, void *a, void *b, void *c );
int im_local_array( IMAGE *im, void **out, int n,
im_construct_fn cons, im_callback_fn dest, void *a, void *b, void *c );
gint64 im_file_length( int fd );
int im__write( int fd, const void *buf, size_t count );
FILE *im__file_open_read( const char *filename );
FILE *im__file_open_write( const char *filename );
char *im__file_read( FILE *fp, const char *name, unsigned int *length_out );
char *im__file_read_name( const char *name, unsigned int *length_out );
int im__file_write( void *data, size_t size, size_t nmemb, FILE *stream );
typedef enum {
VIPS_TOKEN_LEFT = 1, /* ({[ */
VIPS_TOKEN_RIGHT, /* ]}) */
VIPS_TOKEN_STRING, /* string or "str\"ing" */
VIPS_TOKEN_EQUALS, /* = */
VIPS_TOKEN_COMMA /* , */
} VipsToken;
const char *vips__token_get( const char *buffer,
VipsToken *token, char *string, int size );
const char *vips__token_must( const char *buffer, VipsToken *token,
char *string, int size );
const char *vips__token_need( const char *buffer, VipsToken need_token,
char *string, int size );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_UTIL_H*/

View File

@ -1,15 +0,0 @@
/* Macros for the header version.
*/
#ifndef IM_VERSION_H
#define IM_VERSION_H
#define IM_VERSION "@IM_VERSION@"
#define IM_VERSION_STRING "@IM_VERSION_STRING@"
#define IM_MAJOR_VERSION (@IM_MAJOR_VERSION@)
#define IM_MINOR_VERSION (@IM_MINOR_VERSION@)
#define IM_MICRO_VERSION (@IM_MICRO_VERSION@)
#define IM_INTERFACE_AGE (@IM_INTERFACE_AGE@)
#define IM_BINARY_AGE (@IM_BINARY_AGE@)
#endif /*IM_VERSION_H*/

View File

@ -1,109 +0,0 @@
// Include file to get all VIPS C++ bindings
/*
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_VIPS
#define IM_VIPS
#include <vips/version.h>
// VImage.h uses GValue for metadata
#include <glib-object.h>
// If we have already #included the C vips headers, we have to undef a load of
// stuff to stop vips's stupid macros messing up our enums
#ifdef IM_VIPS_H
#ifdef IM_ENABLE_DEPRECATED
#undef MULTIBAND
#undef B_W
#undef LUMINACE
#undef XRAY
#undef IR
#undef YUV
#undef RED_ONLY
#undef GREEN_ONLY
#undef BLUE_ONLY
#undef POWER_SPECTRUM
#undef HISTOGRAM
#undef LUT
#undef XYZ
#undef LAB
#undef CMC
#undef CMYK
#undef LABQ
#undef RGB
#undef UCS
#undef LCH
#undef LABS
#undef sRGB
#undef FMTNOTSET
#undef FMTUCHAR
#undef FMTCHAR
#undef FMTUSHORT
#undef FMTSHORT
#undef FMTUINT
#undef FMTINT
#undef FMTFLOAT
#undef FMTCOMPLEX
#undef FMTDOUBLE
#undef FMTDPCOMPLEX
#undef NOCODING
#undef COLQUANT
#undef LABPACK
#undef LABPACK_COMPRESSED
#undef RGB_COMPRESSED
#undef LUM_COMPRESSED
#undef NO_COMPRESSION
#undef TCSF_COMPRESSION
#undef JPEG_COMPRESSION
#endif /*IM_ENABLE_DEPRECATED*/
#endif /*IM_VIPS_H*/
#ifdef IM_RECT_H
#ifdef IM_ENABLE_DEPRECATED
#undef right
#undef bottom
#endif /*IM_ENABLE_DEPRECATED*/
#endif /*IM_RECT_H*/
#define VIPS_NAMESPACE_START namespace vips {
#define VIPS_NAMESPACE_END }
#include <vips/VError.h>
#include <vips/VDisplay.h>
#include <vips/VMask.h>
#include <vips/VImage.h>
#endif /*IM_VIPS*/

View File

@ -1,520 +0,0 @@
/* @(#) Header file for Birkbeck/VIPS Image Processing Library
* Authors: N. Dessipris, K. Martinez, Birkbeck College, London.
* Sept 94
*
* 15/7/96 JC
* - now does C++ extern stuff
* - many more protos
* 15/4/97 JC
* - protos split out
* 4/3/98 JC
* - IM_ANY added
* - sRGB colourspace added
* 28/10/98 JC
* - VASARI_MAGIC_INTEL and VASARI_MAGIC_SPARC added
* 29/9/99 JC
* - new locks for threading, no more threadgroup stuff in IMAGE
* 30/11/00 JC
* - override RGB/CMYK macros on cygwin
* 21/9/02 JC
* - new Xoffset/Yoffset fields
* - rationalized macro names
* 6/6/05 Markus Wollgarten
* - added Meta header field
* 31/7/05
* - added meta.h for new metadata API
* 22/8/05
* - scrapped stupid VAS_HD
* 30/9/05
* - added sizeof_header field for mmap window read of RAW files
* 4/10/05
* - now you have to define IM_ENABLE_DEPRECATED to get broken #defined
* 5/10/05
* - added GNUC attributes
* 8/5/06
* - added RGB16, GREY16
* 30/10/06
* - added im_window_t
* 7/11/07
* - added preclose and evalstart callbacks
* - brought time struct in here
* 7/3/08
* - MAGIC values should be unsigned
* 2/7/08
* - added invalidate callbacks
* 7/8/08
* - include <time.h>, thanks nicola
*/
/*
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_VIPS_H
#define IM_VIPS_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/* If we're not using GNU C, elide __attribute__
*/
#ifndef __GNUC__
# ifndef __attribute__
# define __attribute__(x) /*NOTHING*/
# endif
#endif
#include <glib.h>
#include <gmodule.h>
#include <glib-object.h>
/* Needed for 'unused' below. Remove this when we remove that.
*/
#include <time.h>
#include <vips/buf.h>
#include <vips/object.h>
#include <vips/version.h>
#include <vips/rect.h>
#define IM_SPARE (8)
/* If you read MSB first, you get these two values.
* intel order: byte 0 = b6
* SPARC order: byte 0 = 08
*/
#define IM_MAGIC_INTEL (0xb6a6f208U)
#define IM_MAGIC_SPARC (0x08f2a6b6U)
/* Private to iofuncs: the image size above which we switch from
* mmap()-whole-image behaviour to mmap()-window, plus window margins.
*/
#define IM__MMAP_LIMIT (1024*1024*30)
#define IM__WINDOW_MARGIN (128)
/* sizeof() a VIPS header on disc.
*/
#define IM_SIZEOF_HEADER (64)
typedef unsigned char PEL; /* useful datum */
/* All these #defines are here for backwards compatibility ... delete them
* soon. See the bottom of this file for the new names.
*/
/* Only define old, broken names if asked.
*/
#ifdef IM_ENABLE_DEPRECATED
/* On win32, need to override the wingdi defs for these. Yuk!
*/
#ifdef HAVE_WINDOWS_H
#ifdef RGB
#undef RGB
#endif
#ifdef CMYK
#undef CMYK
#endif
#endif /*HAVE_WINDOWS_H*/
/* Bits per Band */
#define BBBYTE 8
#define BBSHORT 16
#define BBINT 32
#define BBFLOAT 32
#define BBCOMPLEX 64 /* complex consisting of two floats */
#define BBDOUBLE 64
#define BBDPCOMPLEX 128 /* complex consisting of two doubles */
/* picture Type */
#define MULTIBAND 0
#define B_W 1
#define LUMINACE 2
#define XRAY 3
#define IR 4
#define YUV 5
#define RED_ONLY 6 /* red channel only */
#define GREEN_ONLY 7 /* green channel only */
#define BLUE_ONLY 8 /* blue channel only */
#define POWER_SPECTRUM 9
#define HISTOGRAM 10
#define FOURIER 24
/* Colour spaces.
*/
#define LUT 11
#define XYZ 12
#define LAB 13
#define CMC 14
#define CMYK 15
#define LABQ 16
#define RGB 17
#define UCS 18
#define LCH 19
#define LABS 21
#define sRGB 22
#define YXY 23
/* BandFmt
*/
#define FMTNOTSET -1
#define FMTUCHAR 0 /* pels interpreted as unsigned chars */
#define FMTCHAR 1 /* pels interpreted as signed chars */
#define FMTUSHORT 2 /* pels interpreted as unsigned shorts */
#define FMTSHORT 3 /* pels interpreted as signed shorts */
#define FMTUINT 4 /* pels interpreted as unsigned ints */
#define FMTINT 5 /* pels interpreted as signed ints */
#define FMTFLOAT 6 /* pels interpreted as floats */
#define FMTCOMPLEX 7 /* pels interpreted as complex (2 float each) */
#define FMTDOUBLE 8 /* pels interpreted as unsigned double */
#define FMTDPCOMPLEX 9 /* pels interpreted as complex (2 double each)*/
/* Coding type
*/
#define NOCODING 0
#define COLQUANT 1
#define LABPACK 2
#define LABPACK_COMPRESSED 3
#define RGB_COMPRESSED 4
#define LUM_COMPRESSED 5
/* Compression type
*/
#define NO_COMPRESSION 0
#define TCSF_COMPRESSION 1
#define JPEG_COMPRESSION 2
#endif /*IM_ENABLE_DEPRECATED*/
/* Types of image descriptor we may have. The type field is advisory only: it
* does not imply that any fields in IMAGE have valid data.
*/
typedef enum {
IM_NONE, /* no type set */
IM_SETBUF, /* malloced memory array */
IM_SETBUF_FOREIGN, /* memory array, don't free on close */
IM_OPENIN, /* input from fd */
IM_MMAPIN, /* memory mapped input file */
IM_MMAPINRW, /* memory mapped read/write file */
IM_OPENOUT, /* output to fd */
IM_PARTIAL /* partial image */
} im_desc_type;
/* Demand style from im_generate(). See im_demand_hint().
*/
typedef enum {
IM_SMALLTILE,
IM_FATSTRIP,
IM_THINSTRIP,
IM_ANY /* Not from a disc file, any geometry */
} im_demand_type;
/* What we track for each mmap window. Have a list of these on an openin
* IMAGE.
*/
typedef struct {
int ref_count; /* # of regions referencing us */
struct im__IMAGE *im; /* IMAGE we are attached to */
int top; /* Area of image we have mapped, in pixels */
int height;
char *data; /* First pixel of line 'top' */
PEL *baseaddr; /* Base of window */
size_t length; /* Size of window */
} im_window_t;
/* Struct we keep a record of execution time in. Passed to eval callback, so
* it can assess progress.
*
* The 'unused' field is there for binary compatibility, remove this when we
* break ABI. Though, at least on windows, sizeof(time_t) can vary with
* compiler flags, so we might break ABI anyway. Remove the #include <time.h>
* when we remove this.
*/
typedef struct {
struct im__IMAGE *im; /* Image we are part of */
time_t unused; /* FIXME ... for binary compatibility */
int run; /* Time we have been running */
int eta; /* Estimated seconds of computation left */
gint64 tpels; /* Number of pels we expect to calculate */
gint64 npels; /* Number of pels calculated so far */
int percent; /* Percent complete */
GTimer *start; /* Start time */
} im_time_t;
/* Image descriptor for subroutine i/o args
*/
typedef struct im__IMAGE {
/* Fields from file header.
*/
int Xsize;
int Ysize;
int Bands;
int Bbits;
int BandFmt;
int Coding;
int Type;
float Xres;
float Yres;
int Length;
short Compression;
short Level;
int Xoffset;
int Yoffset;
/* Derived fields that user can fiddle with.
*/
char *Hist; /* don't use ... call im_history_get() */
char *filename; /* pointer to copy of filename */
char *data; /* start of image data for WIO */
im_time_t *time; /* time struct for eval callback */
int kill; /* set to non-zero to block partial eval */
/* Private fields.
*/
im_desc_type dtype; /* descriptor type */
int fd; /* file descriptor */
char *baseaddr; /* pointer to the start of an mmap file */
size_t length; /* size of mmap area */
GSList *closefns; /* list of close callbacks */
GSList *evalfns; /* list of eval callbacks */
GSList *evalendfns; /* list of eval end callbacks */
int closing; /* true for this descriptor is closing */
int close_pending; /* true for this descriptor is a zombie */
guint32 magic; /* magic from header, endian-ness of image */
/* Partial image stuff. All private! All these fields are initialised
* to NULL and ignored unless set by im_generate() or im_partial().
*/
void *(*start)(); /* user-supplied start function */
int (*generate)(); /* user-supplied generate function */
int (*stop)(); /* user-supplied stop function */
void *client1; /* user arguments */
void *client2;
GMutex *sslock; /* start-stop lock */
GSList *regions; /* list of regions current for this image */
im_demand_type dhint; /* demand style hint */
/* Extra user-defined fields ... see im_meta_get_int() etc.
*/
GHashTable *Meta; /* GhashTable of GValue */
GSList *Meta_traverse; /* Traverse order for Meta */
/* Part of mmap() read ... the sizeof() the header we skip from the
* file start. Usually IM_SIZEOF_HEADER, but can be something else
* for binary file read.
*/
int sizeof_header;
/* If this is a large disc image, don't map the whole thing, instead
* have a set of windows shared between the regions active on the
* image. List of im_window_t.
*/
GSList *windows;
/* Parent/child relationships, built from args to im_demand_hint().
* We use these to invalidate pixel buffers on im_invalidate(). Use
* 'serial' to spot circular dependencies.
*/
GSList *parents;
GSList *children;
int serial;
/* Keep a list of recounted GValue strings so we can share hist
* efficiently.
*/
GSList *history_list;
/* The IMAGE (if any) we should signal eval progress on.
*/
struct im__IMAGE *progress;
/* Some more callbacks. Appended to IMAGE for binary compatibility.
*/
GSList *evalstartfns; /* list of start eval callbacks */
GSList *preclosefns; /* list of pre-close callbacks */
GSList *invalidatefns; /* list of invalidate callbacks */
/* Record the file length here. We use this to stop ourselves mapping
* things beyond the end of the file in the case that the file has
* been truncated.
*/
size_t file_length;
} IMAGE;
/* Only define if IM_ENABLE_DEPRECATED is set.
*/
#ifdef IM_ENABLE_DEPRECATED
/* Macros on IMAGEs.
* esize() sizeof band element
* psize() sizeof pel
* lsize() sizeof scan line
* niele() number of elements in scan line
*/
#define esize(I) ((I)->Bbits >> 3)
#define psize(I) (esize(I)*(I)->Bands)
#define lsize(I) (psize(I)*(I)->Xsize)
#define niele(I) ((I)->Bands*(I)->Xsize)
#endif /*IM_ENABLE_DEPRECATED*/
/* Used to define a region of interest for im_extract() etc.
*/
typedef struct {
int xstart;
int ystart;
int xsize;
int ysize;
int chsel; /* 1 2 3 or 0, for r g b or all respectively
*(channel select) */
} IMAGE_BOX;
/* @(#) Definition for structure to hold integer or double masks
*/
typedef struct im__INTMASK {
int xsize;
int ysize;
int scale;
int offset;
int *coeff;
char *filename;
} INTMASK ;
typedef struct im__DOUBLEMASK {
int xsize;
int ysize;
double scale;
double offset;
double *coeff;
char *filename;
} DOUBLEMASK ;
/* A colour temperature.
*/
typedef struct {
double X0, Y0, Z0;
} im_colour_temperature;
/* Sensible names for our #defines. Only bother with
* the ones we actually use. Switch over to defining only these ones at some
* point (vips8?).
*/
#define IM_BBITS_BYTE (8)
#define IM_BBITS_SHORT (16)
#define IM_BBITS_INT (32)
#define IM_BBITS_FLOAT (32)
#define IM_BBITS_COMPLEX (64)
#define IM_BBITS_DOUBLE (64)
#define IM_BBITS_DPCOMPLEX (128)
#define IM_TYPE_MULTIBAND (0)
#define IM_TYPE_B_W (1)
#define IM_TYPE_HISTOGRAM (10)
#define IM_TYPE_FOURIER (24)
#define IM_TYPE_XYZ (12)
#define IM_TYPE_LAB (13)
#define IM_TYPE_CMYK (15)
#define IM_TYPE_LABQ (16)
#define IM_TYPE_RGB (17)
#define IM_TYPE_UCS (18)
#define IM_TYPE_LCH (19)
#define IM_TYPE_LABS (21)
#define IM_TYPE_sRGB (22)
#define IM_TYPE_YXY (23)
#define IM_TYPE_RGB16 (25)
#define IM_TYPE_GREY16 (26)
#define IM_BANDFMT_NOTSET (-1)
#define IM_BANDFMT_UCHAR (0)
#define IM_BANDFMT_CHAR (1)
#define IM_BANDFMT_USHORT (2)
#define IM_BANDFMT_SHORT (3)
#define IM_BANDFMT_UINT (4)
#define IM_BANDFMT_INT (5)
#define IM_BANDFMT_FLOAT (6)
#define IM_BANDFMT_COMPLEX (7)
#define IM_BANDFMT_DOUBLE (8)
#define IM_BANDFMT_DPCOMPLEX (9)
#define IM_CODING_NONE (0)
#define IM_CODING_LABQ (2)
#define IM_CODING_RAD (6)
#define IM_IMAGE_SIZEOF_ELEMENT(I) ((I)->Bbits >> 3)
#define IM_IMAGE_SIZEOF_PEL(I) \
(IM_IMAGE_SIZEOF_ELEMENT(I) * (I)->Bands)
#define IM_IMAGE_SIZEOF_LINE(I) (IM_IMAGE_SIZEOF_PEL(I) * (I)->Xsize)
#define IM_IMAGE_N_ELEMENTS(I) ((I)->Bands * (I)->Xsize)
/* If DEBUG is defined, add bounds checking.
*/
#ifdef DEBUG
#define IM_IMAGE_ADDR(I,X,Y) \
( ((X) >= 0 && (X) < (I)->Xsize && \
(Y) >= 0 && (Y) < (I)->Ysize) ? \
((I)->data + (Y) * IM_IMAGE_SIZEOF_LINE(I) + \
(X) * IM_IMAGE_SIZEOF_PEL(I)) : \
(fprintf( stderr, \
"IM_IMAGE_ADDR: point out of bounds, " \
"file \"%s\", line %d\n" \
"(point x=%d, y=%d\n" \
" should have been within Rect left=%d, top=%d, " \
"width=%d, height=%d)\n", \
__FILE__, __LINE__, \
(X), (Y), \
0, 0, \
(I)->Xsize, \
(I)->Ysize ), abort(), (char *) NULL) \
)
#else /*DEBUG*/
#define IM_IMAGE_ADDR(I,X,Y) \
((I)->data + \
(Y) * IM_IMAGE_SIZEOF_LINE(I) + \
(X) * IM_IMAGE_SIZEOF_PEL(I))
#endif /*DEBUG*/
#include <vips/util.h>
#include <vips/colour.h>
/* #include <vips/vector.h> */
#include <vips/format.h>
#include <vips/dispatch.h>
#include <vips/region.h>
#include <vips/interpolate.h>
#include <vips/semaphore.h>
#include <vips/threadgroup.h>
#include <vips/meta.h>
#include <vips/proto.h>
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_VIPS_H*/

View File

@ -1,318 +0,0 @@
// this file automatically generated from
// VIPS library 7.17.3-Thu Mar 19 13:54:43 GMT 2009
VDMask estpar( VImage, int, int, int, double& ) throw( VError );
VImage transform( VDMask, int, int ) throw( VError );
VImage transform_search( VImage, double, int, int, int, int, VDMask&, double& ) throw( VError );
VImage abs() throw( VError );
VImage acos() throw( VError );
VImage add( VImage ) throw( VError );
VImage asin() throw( VError );
VImage atan() throw( VError );
double avg() throw( VError );
double point_bilinear( double, double, int ) throw( VError );
VImage bandmean() throw( VError );
VImage ceil() throw( VError );
VImage cmulnorm( VImage ) throw( VError );
VImage cos() throw( VError );
VImage cross_phase( VImage ) throw( VError );
double deviate() throw( VError );
VImage divide( VImage ) throw( VError );
VImage exp10() throw( VError );
VImage expn( double ) throw( VError );
VImage expn( std::vector<double> ) throw( VError );
VImage exp() throw( VError );
VImage fav4( VImage, VImage, VImage ) throw( VError );
VImage floor() throw( VError );
VImage gadd( double, double, VImage, double ) throw( VError );
VImage invert() throw( VError );
VImage lin( double, double ) throw( VError );
static VImage linreg( std::vector<VImage>, std::vector<double> ) throw( VError );
VImage lin( std::vector<double>, std::vector<double> ) throw( VError );
VImage litecor( VImage, int, double ) throw( VError );
VImage log10() throw( VError );
VImage log() throw( VError );
double max() throw( VError );
std::complex<double> maxpos() throw( VError );
double maxpos_avg( double&, double& ) throw( VError );
VDMask measure( int, int, int, int, int, int ) throw( VError );
double min() throw( VError );
std::complex<double> minpos() throw( VError );
VImage multiply( VImage ) throw( VError );
VImage pow( double ) throw( VError );
VImage pow( std::vector<double> ) throw( VError );
VImage remainder( VImage ) throw( VError );
VImage remainder( double ) throw( VError );
VImage remainder( std::vector<double> ) throw( VError );
VImage rint() throw( VError );
VImage sign() throw( VError );
VImage sin() throw( VError );
VDMask stats() throw( VError );
VImage subtract( VImage ) throw( VError );
VImage tan() throw( VError );
VImage andimage( VImage ) throw( VError );
VImage andimage( int ) throw( VError );
VImage andimage( std::vector<double> ) throw( VError );
VImage orimage( VImage ) throw( VError );
VImage orimage( int ) throw( VError );
VImage orimage( std::vector<double> ) throw( VError );
VImage eorimage( VImage ) throw( VError );
VImage eorimage( int ) throw( VError );
VImage eorimage( std::vector<double> ) throw( VError );
VImage shiftleft( int ) throw( VError );
VImage shiftright( int ) throw( VError );
VImage greyc( int, double, double, double, double, double, double, double, double, int, int ) throw( VError );
VImage greyc_mask( VImage, int, double, double, double, double, double, double, double, double, int, int ) throw( VError );
VImage LCh2Lab() throw( VError );
VImage LCh2UCS() throw( VError );
VImage Lab2LCh() throw( VError );
VImage Lab2LabQ() throw( VError );
VImage Lab2LabS() throw( VError );
VImage Lab2UCS() throw( VError );
VImage Lab2XYZ() throw( VError );
VImage Lab2XYZ_temp( double, double, double ) throw( VError );
VImage Lab2disp( VDisplay ) throw( VError );
VImage LabQ2LabS() throw( VError );
VImage LabQ2Lab() throw( VError );
VImage LabQ2XYZ() throw( VError );
VImage LabQ2disp( VDisplay ) throw( VError );
VImage LabS2LabQ() throw( VError );
VImage LabS2Lab() throw( VError );
VImage UCS2LCh() throw( VError );
VImage UCS2Lab() throw( VError );
VImage UCS2XYZ() throw( VError );
VImage XYZ2Lab() throw( VError );
VImage XYZ2Lab_temp( double, double, double ) throw( VError );
VImage XYZ2UCS() throw( VError );
VImage XYZ2Yxy() throw( VError );
VImage XYZ2disp( VDisplay ) throw( VError );
VImage XYZ2sRGB() throw( VError );
VImage Yxy2XYZ() throw( VError );
VImage dE00_fromLab( VImage ) throw( VError );
VImage dECMC_fromLab( VImage ) throw( VError );
VImage dECMC_fromdisp( VImage, VDisplay ) throw( VError );
VImage dE_fromLab( VImage ) throw( VError );
VImage dE_fromXYZ( VImage ) throw( VError );
VImage dE_fromdisp( VImage, VDisplay ) throw( VError );
VImage disp2Lab( VDisplay ) throw( VError );
VImage disp2XYZ( VDisplay ) throw( VError );
VImage float2rad() throw( VError );
VImage icc_ac2rc( char* ) throw( VError );
VImage icc_export( char*, int ) throw( VError );
VImage icc_export_depth( int, char*, int ) throw( VError );
VImage icc_import( char*, int ) throw( VError );
VImage icc_import_embedded( int ) throw( VError );
VImage icc_transform( char*, char*, int ) throw( VError );
VImage lab_morph( VDMask, double, double, double, double ) throw( VError );
VImage rad2float() throw( VError );
VImage sRGB2XYZ() throw( VError );
VImage bandjoin( VImage ) throw( VError );
static VImage black( int, int, int ) throw( VError );
VImage c2amph() throw( VError );
VImage c2imag() throw( VError );
VImage c2ps() throw( VError );
VImage c2real() throw( VError );
VImage c2rect() throw( VError );
VImage clip2c() throw( VError );
VImage clip2cm() throw( VError );
VImage clip2d() throw( VError );
VImage clip2dcm() throw( VError );
VImage clip2f() throw( VError );
VImage clip2fmt( int ) throw( VError );
VImage clip2i() throw( VError );
VImage clip2s() throw( VError );
VImage clip2ui() throw( VError );
VImage clip2us() throw( VError );
VImage clip() throw( VError );
VImage copy() throw( VError );
VImage copy_morph( int, int, int ) throw( VError );
VImage copy_swap() throw( VError );
VImage copy_set( int, double, double, int, int ) throw( VError );
VImage extract_area( int, int, int, int ) throw( VError );
VImage extract_areabands( int, int, int, int, int, int ) throw( VError );
VImage extract_band( int ) throw( VError );
VImage extract_bands( int, int ) throw( VError );
VImage extract( int, int, int, int, int ) throw( VError );
VImage falsecolour() throw( VError );
VImage fliphor() throw( VError );
VImage flipver() throw( VError );
static VImage gbandjoin( std::vector<VImage> ) throw( VError );
VImage grid( int, int, int ) throw( VError );
VImage insert( VImage, int, int ) throw( VError );
VImage insert_noexpand( VImage, int, int ) throw( VError );
VImage lrjoin( VImage ) throw( VError );
static VImage mask2vips( VDMask ) throw( VError );
VImage msb() throw( VError );
VImage msb_band( int ) throw( VError );
VImage recomb( VDMask ) throw( VError );
VImage replicate( int, int ) throw( VError );
VImage ri2c( VImage ) throw( VError );
VImage rot180() throw( VError );
VImage rot270() throw( VError );
VImage rot90() throw( VError );
VImage scale() throw( VError );
VImage scaleps() throw( VError );
VImage rightshift_size( int, int, int ) throw( VError );
VImage slice( double, double ) throw( VError );
VImage subsample( int, int ) throw( VError );
char* system( char* ) throw( VError );
VImage tbjoin( VImage ) throw( VError );
static VImage text( char*, char*, int, int, int ) throw( VError );
VImage thresh( double ) throw( VError );
VDMask vips2mask() throw( VError );
VImage wrap( int, int ) throw( VError );
VImage zoom( int, int ) throw( VError );
VImage addgnoise( double ) throw( VError );
VImage compass( VIMask ) throw( VError );
VImage contrast_surface( int, int ) throw( VError );
VImage contrast_surface_raw( int, int ) throw( VError );
VImage conv( VIMask ) throw( VError );
VImage conv_raw( VIMask ) throw( VError );
VImage convf( VDMask ) throw( VError );
VImage convf_raw( VDMask ) throw( VError );
VImage convsep( VIMask ) throw( VError );
VImage convsep_raw( VIMask ) throw( VError );
VImage convsepf( VDMask ) throw( VError );
VImage convsepf_raw( VDMask ) throw( VError );
VImage convsub( VIMask, int, int ) throw( VError );
VImage embed( int, int, int, int, int ) throw( VError );
VImage fastcor( VImage ) throw( VError );
VImage fastcor_raw( VImage ) throw( VError );
static VImage gaussnoise( int, int, double, double ) throw( VError );
VImage grad_x() throw( VError );
VImage grad_y() throw( VError );
VImage gradcor( VImage ) throw( VError );
VImage gradcor_raw( VImage ) throw( VError );
VImage gradient( VIMask ) throw( VError );
static VImage rank_image( std::vector<VImage>, int ) throw( VError );
VImage lindetect( VIMask ) throw( VError );
static VImage maxvalue( std::vector<VImage> ) throw( VError );
int mpercent( double ) throw( VError );
VImage phasecor_fft( VImage ) throw( VError );
VImage rank( int, int, int ) throw( VError );
VImage rank_raw( int, int, int ) throw( VError );
VImage resize_linear( int, int ) throw( VError );
VImage sharpen( int, double, double, double, double, double ) throw( VError );
VImage shrink( double, double ) throw( VError );
VImage spcor( VImage ) throw( VError );
VImage spcor_raw( VImage ) throw( VError );
VImage stretch3( double, double ) throw( VError );
VImage zerox( int ) throw( VError );
static VImage csv2vips( char* ) throw( VError );
static VImage jpeg2vips( char* ) throw( VError );
static VImage magick2vips( char* ) throw( VError );
static VImage png2vips( char* ) throw( VError );
static VImage exr2vips( char* ) throw( VError );
static VImage ppm2vips( char* ) throw( VError );
static VImage analyze2vips( char* ) throw( VError );
static VImage tiff2vips( char* ) throw( VError );
void vips2csv( char* ) throw( VError );
void vips2jpeg( char* ) throw( VError );
void vips2mimejpeg( int ) throw( VError );
void vips2png( char* ) throw( VError );
void vips2ppm( char* ) throw( VError );
void vips2tiff( char* ) throw( VError );
static VImage create_fmask( int, int, int, double, double, double, double, double ) throw( VError );
VImage disp_ps() throw( VError );
VImage flt_image_freq( int, double, double, double, double, double ) throw( VError );
static VImage fractsurf( int, double ) throw( VError );
VImage freqflt( VImage ) throw( VError );
VImage fwfft() throw( VError );
VImage rotquad() throw( VError );
VImage invfft() throw( VError );
VImage invfftr() throw( VError );
VImage gammacorrect( double ) throw( VError );
VImage heq( int ) throw( VError );
VImage hist( int ) throw( VError );
VImage histcum() throw( VError );
VImage histeq() throw( VError );
VImage histgr( int ) throw( VError );
VImage histnD( int ) throw( VError );
VImage histnorm() throw( VError );
VImage histplot() throw( VError );
VImage histspec( VImage ) throw( VError );
VImage hsp( VImage ) throw( VError );
static VImage identity( int ) throw( VError );
static VImage identity_ushort( int, int ) throw( VError );
int ismonotonic() throw( VError );
VImage lhisteq( int, int ) throw( VError );
VImage lhisteq_raw( int, int ) throw( VError );
static VImage invertlut( VDMask, int ) throw( VError );
static VImage buildlut( VDMask ) throw( VError );
VImage maplut( VImage ) throw( VError );
VImage project( VImage& ) throw( VError );
VImage stdif( double, double, double, double, int, int ) throw( VError );
VImage stdif_raw( double, double, double, double, int, int ) throw( VError );
VImage tone_analyse( double, double, double, double, double, double ) throw( VError );
static VImage tone_build( double, double, double, double, double, double, double, double ) throw( VError );
static VImage tone_build_range( int, int, double, double, double, double, double, double, double, double ) throw( VError );
VImage tone_map( VImage ) throw( VError );
void circle( int, int, int, int ) throw( VError );
VImage flood_blob_copy( int, int, std::vector<double> ) throw( VError );
void insertplace( VImage, int, int ) throw( VError );
void line( int, int, int, int, int ) throw( VError );
VImage lineset( VImage, VImage, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int> ) throw( VError );
static VImage binfile( char*, int, int, int, int ) throw( VError );
VImage cache( int, int, int ) throw( VError );
int header_get_type( char* ) throw( VError );
int header_int( char* ) throw( VError );
double header_double( char* ) throw( VError );
char* header_string( char* ) throw( VError );
double cntlines( int ) throw( VError );
VImage dilate( VIMask ) throw( VError );
VImage dilate_raw( VIMask ) throw( VError );
VImage erode( VIMask ) throw( VError );
VImage erode_raw( VIMask ) throw( VError );
VImage profile( int ) throw( VError );
VImage align_bands() throw( VError );
double correl( VImage, int, int, int, int, int, int, int&, int& ) throw( VError );
int _find_lroverlap( VImage, int, int, int, int, int, int, int, int&, double&, double&, double&, double& ) throw( VError );
int _find_tboverlap( VImage, int, int, int, int, int, int, int, int&, double&, double&, double&, double& ) throw( VError );
VImage global_balance( double ) throw( VError );
VImage global_balancef( double ) throw( VError );
VImage lrmerge( VImage, int, int, int ) throw( VError );
VImage lrmerge1( VImage, int, int, int, int, int, int, int, int, int ) throw( VError );
VImage lrmosaic( VImage, int, int, int, int, int, int, int, int, int ) throw( VError );
VImage lrmosaic1( VImage, int, int, int, int, int, int, int, int, int, int, int, int, int ) throw( VError );
VImage match_linear( VImage, int, int, int, int, int, int, int, int ) throw( VError );
VImage match_linear_search( VImage, int, int, int, int, int, int, int, int, int, int ) throw( VError );
double maxpos_subpel( double& ) throw( VError );
VImage remosaic( char*, char* ) throw( VError );
VImage tbmerge( VImage, int, int, int ) throw( VError );
VImage tbmerge1( VImage, int, int, int, int, int, int, int, int, int ) throw( VError );
VImage tbmosaic( VImage, int, int, int, int, int, int, int, int, int ) throw( VError );
VImage tbmosaic1( VImage, int, int, int, int, int, int, int, int, int, int, int, int, int ) throw( VError );
VImage benchmark() throw( VError );
double benchmark2() throw( VError );
VImage benchmarkn( int ) throw( VError );
static VImage eye( int, int, double ) throw( VError );
static VImage grey( int, int ) throw( VError );
static VImage feye( int, int, double ) throw( VError );
static VImage fgrey( int, int ) throw( VError );
static VImage fzone( int ) throw( VError );
static VImage make_xy( int, int ) throw( VError );
static VImage zone( int ) throw( VError );
VImage blend( VImage, VImage ) throw( VError );
VImage equal( VImage ) throw( VError );
VImage equal( std::vector<double> ) throw( VError );
VImage equal( double ) throw( VError );
VImage ifthenelse( VImage, VImage ) throw( VError );
VImage less( VImage ) throw( VError );
VImage less( std::vector<double> ) throw( VError );
VImage less( double ) throw( VError );
VImage lesseq( VImage ) throw( VError );
VImage lesseq( std::vector<double> ) throw( VError );
VImage lesseq( double ) throw( VError );
VImage more( VImage ) throw( VError );
VImage more( std::vector<double> ) throw( VError );
VImage more( double ) throw( VError );
VImage moreeq( VImage ) throw( VError );
VImage moreeq( std::vector<double> ) throw( VError );
VImage moreeq( double ) throw( VError );
VImage notequal( VImage ) throw( VError );
VImage notequal( std::vector<double> ) throw( VError );
VImage notequal( double ) throw( VError );
VImage affine( double, double, double, double, double, double, int, int, int, int ) throw( VError );
VImage similarity_area( double, double, double, double, int, int, int, int ) throw( VError );
VImage similarity( double, double, double, double ) throw( VError );
static VImage video_test( int, int ) throw( VError );
static VImage video_v4l1( char*, int, int, int, int, int, int ) throw( VError );

View File

@ -1,39 +0,0 @@
// Include file to get all VIPS C++ bindings
/*
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
*/
/* This header is just for compatibility with the pre-namespace C++ bindings.
*/
#ifndef IM_VIPSCPP_H
#define IM_VIPSCPP_H
#include <vips/vips>
using namespace vips;
#endif /*IM_VIPSCPP_H*/