Merge remote-tracking branch 'origin/master' into colour

Conflicts:
	TODO
	libvips/colour/colour.c
This commit is contained in:
John Cupitt 2012-04-18 17:20:36 +01:00
commit 40f60c4b9e
39 changed files with 558 additions and 3995 deletions

View File

@ -4,8 +4,20 @@
- nearest-neighbor interpolation rounds coordinates to nearest instead of
rounding down (thanks Nicolas)
- add dzsave, save in deep zoom format
- add VIPS_CODING_ARGB
- openslideload output tagged as ARGB
17/4/12 started 7.28.4
- up max buffer size for vipsbuf
6/4/12 started 7.28.3
- vips_divide() failed for int arguments
- fix warning for unused vips7 gvalue argument
- fix openslide read: always return png-style rgba, im_argb2rgba() becomes a
NOP
- cast to unsigned int now removes <0 values
- vips7 interface to openslide now supports :,level,associated options (thanks
Benjamin)
- make vips8 cache smaller
- more accurate progress reporting
13/3/12 started 7.28.2
- xres/yres tiffsave args were broken

12
TODO
View File

@ -83,10 +83,18 @@ foreign
ppm.c
radiance.c
- should there be some way to set the seq cache size?
- is the tif reader deadlocking sometimes?
is it when we get a non-seq error?
should there be some way to set the seq cache size?
- foreign docs come up as "VipsForeignSave", annoying, why?
- make an argb coding type, add to nip2 and known coding
see openslide
- add nifti support
http://niftilib.sourceforge.net/
@ -119,8 +127,6 @@ packaging
- do we bundle "convert" in the OS X / win32 builds? if we don't we
should
- goffice on OS X seems to be broken?
convolution
===========

View File

@ -30,6 +30,9 @@
* - rewrite as a class
* 22/2/12
* - avoid /0 for complex as well
* 6/4/12
* - fixed switch cases
* - fixed int operands with <1 result
*/
/*
@ -150,7 +153,7 @@ G_DEFINE_TYPE( VipsDivide, vips_divide, VIPS_TYPE_BINARY );
#endif /* USE_MODARG_DIV */
/* Real divide.
/* Real divide. Cast in to OUT before divide so we work for float output.
*/
#define RLOOP( IN, OUT ) { \
IN *left = (IN *) in[0]; \
@ -158,10 +161,10 @@ G_DEFINE_TYPE( VipsDivide, vips_divide, VIPS_TYPE_BINARY );
OUT *q = (OUT *) out; \
\
for( x = 0; x < sz; x++ ) \
if( right[x] == 0.0 ) \
if( right[x] == 0 ) \
q[x] = 0; \
else \
q[x] = left[x] / right[x]; \
q[x] = (OUT) left[x] / (OUT) right[x]; \
}
static void
@ -177,12 +180,12 @@ vips_divide_buffer( VipsArithmetic *arithmetic,
* below.
*/
switch( vips_image_get_format( im ) ) {
case VIPS_FORMAT_CHAR: RLOOP( signed char, signed short ); break;
case VIPS_FORMAT_UCHAR: RLOOP( unsigned char, signed short ); break;
case VIPS_FORMAT_SHORT: RLOOP( signed short, signed int ); break;
case VIPS_FORMAT_USHORT:RLOOP( unsigned short, signed int ); break;
case VIPS_FORMAT_INT: RLOOP( signed int, signed int ); break;
case VIPS_FORMAT_UINT: RLOOP( unsigned int, signed int ); break;
case VIPS_FORMAT_CHAR: RLOOP( signed char, float ); break;
case VIPS_FORMAT_UCHAR: RLOOP( unsigned char, float ); break;
case VIPS_FORMAT_SHORT: RLOOP( signed short, float ); break;
case VIPS_FORMAT_USHORT: RLOOP( unsigned short, float ); break;
case VIPS_FORMAT_INT: RLOOP( signed int, float ); break;
case VIPS_FORMAT_UINT: RLOOP( unsigned int, float ); break;
case VIPS_FORMAT_FLOAT: RLOOP( float, float ); break;
case VIPS_FORMAT_DOUBLE: RLOOP( double, double ); break;
@ -235,7 +238,7 @@ vips_divide_init( VipsDivide *divide )
}
/**
* vips_divide::
* vips_divide:
* @in1: input image 1
* @in2: input image 2
* @out: output image

View File

@ -7,7 +7,6 @@ libcolour_la_SOURCES = \
colour_dispatch.c \
derived.c \
im_icc_transform.c \
im_argb2rgba.c \
im_LCh2Lab.c \
im_LCh2UCS.c \
im_Lab2LCh.c \

View File

@ -640,25 +640,6 @@ static im_function rad2float_desc = {
one_in_one_out /* Arg list */
};
/* Call im_argb2rgba() via arg vector.
*/
static int
argb2rgba_vec( im_object *argv )
{
return( im_argb2rgba( argv[0], argv[1] ) );
}
/* Description of im_argb2rgba.
*/
static im_function argb2rgba_desc = {
"im_argb2rgba", /* Name */
"convert pre-multipled argb to png-style rgba", /* Description */
IM_FN_PIO, /* Flags */
argb2rgba_vec, /* Dispatch function */
IM_NUMBER( one_in_one_out ), /* Size of arg list */
one_in_one_out /* Arg list */
};
/* Call im_float2rad() via arg vector.
*/
static int
@ -1204,7 +1185,6 @@ static im_function *colour_list[] = {
&disp2Lab_desc,
&disp2XYZ_desc,
&float2rad_desc,
&argb2rgba_desc,
&icc_ac2rc_desc,
&icc_export_depth_desc,
&icc_import_desc,

View File

@ -1,104 +0,0 @@
/* Convert pre-multipled argb to rgba
*
* 11/12/11
* - from im_rad2float.c
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif /*HAVE_CONFIG_H*/
#include <vips/intl.h>
#include <stdio.h>
#include <math.h>
#include <vips/vips.h>
static void
argb2rgba( guint32 *in, VipsPel *out, int n, void *_bg )
{
guint32 bg = GPOINTER_TO_UINT( _bg );
int i;
for( i = 0; i < n; i++ ) {
guint32 x = in[i];
guint8 a = x >> 24;
/* Convert from ARGB to RGBA and undo premultiplication.
*/
if( a != 0 ) {
out[0] = 255 * ((x >> 16) & 255) / a;
out[1] = 255 * ((x >> 8) & 255) / a;
out[2] = 255 * (x & 255) / a;
}
else {
/* Use background color.
*/
out[0] = (bg >> 16) & 255;
out[1] = (bg >> 8) & 255;
out[2] = bg & 255;
}
out[3] = a;
out += 4;
}
}
/**
* im_argb2rgba:
* @in: input image
* @out: output image
*
* Convert Cairo-style pre-multiplied argb to png-style rgba. Background
* pixels are painted with the metadata item "background-rgb".
*
* See also: im_openslide2vips().
*
* Returns: 0 on success, -1 on error.
*/
int
im_argb2rgba( VipsImage *in, IMAGE *out )
{
guint32 bg;
if( vips_check_coding_argb( "argb2rgba", in ) ||
im_cp_desc( out, in ) )
return( -1 );
out->Coding = IM_CODING_NONE;
if( vips_image_get_int( in, VIPS_META_BACKGROUND_RGB, (int *) &bg ) )
bg = 0xffffff;
if( im_wrapone( in, out,
(im_wrapone_fn) argb2rgba, GUINT_TO_POINTER( bg ), NULL ) )
return( -1 );
return( 0 );
}

View File

@ -180,12 +180,12 @@ rad2float( COLR *inp, COLOR *outbuf, int n )
int
im_rad2float( IMAGE *in, IMAGE *out )
{
if( vips_check_coding_rad( "rad2float", in ) ||
if( vips_check_coding_rad( "argb2rgba", in ) ||
im_cp_desc( out, in ) )
return( -1 );
out->Bands = 3;
out->BandFmt = IM_BANDFMT_FLOAT;
out->Coding = VIPS_CODING_NONE;
out->Coding = IM_CODING_NONE;
if( im_wrapone( in, out,
(im_wrapone_fn) rad2float, NULL, NULL ) )

View File

@ -45,6 +45,8 @@
* - gtk-doc
* 27/10/11
* - redone as a class
* 10/4/12
* - cast to uint now removes <0 values
*/
/*
@ -288,7 +290,7 @@ vips_cast_start( VipsImage *out, void *a, void *b )
break; \
\
case VIPS_FORMAT_UINT: \
INT( ITYPE, unsigned int, VIPS_CLIP_NONE ); \
INT( ITYPE, unsigned int, VIPS_CLIP_UINT ); \
break; \
\
case VIPS_FORMAT_INT: \

View File

@ -2188,10 +2188,30 @@ static im_function ifthenelse_desc = {
ifthenelse_args /* Arg list */
};
/* Call im_argb2rgba() via arg vector.
*/
static int
argb2rgba_vec( im_object *argv )
{
return( im_argb2rgba( argv[0], argv[1] ) );
}
/* Description of im_argb2rgba.
*/
static im_function argb2rgba_desc = {
"im_argb2rgba", /* Name */
"convert pre-multipled argb to png-style rgba", /* Description */
IM_FN_PIO, /* Flags */
argb2rgba_vec, /* Dispatch function */
IM_NUMBER( one_in_one_out ), /* Size of arg list */
one_in_one_out /* Arg list */
};
/* Package up all these functions.
*/
static im_function *deprecated_list[] = {
&argb2rgba_desc,
&flood_copy_desc,
&flood_blob_copy_desc,
&flood_other_copy_desc,

View File

@ -817,7 +817,11 @@ gvalue_free( im_object obj )
{
GValue *value = obj;
g_value_unset( value );
/* If it's just zeros (built but not used) we'll get an error if we
* unset().
*/
if( G_IS_VALUE( value ) )
g_value_unset( value );
return( 0 );
}

View File

@ -2,6 +2,8 @@
*
* 17/12/11
* - just a stub
* 11/4/12
* - support :level,associated in filenames
*/
/*
@ -49,11 +51,35 @@
#include <vips/internal.h>
static int
im_openslide2vips( const char *filename, IMAGE *out )
im_openslide2vips( const char *name, IMAGE *out )
{
char filename[FILENAME_MAX];
char mode[FILENAME_MAX];
char *p, *q;
char *associated;
int level;
char *endptr;
VipsImage *t;
if( vips_openslideload( filename, &t, NULL ) )
im_filename_split( name, filename, mode );
level = 0;
associated = NULL;
p = &mode[0];
if( (q = im_getnextoption( &p )) ) {
level = strtoul( q, &endptr, 10 );
if( *endptr ) {
vips_error( "openslide2vips", "%s",
_( "level must be a number" ) );
return( -1 );
}
}
if( (q = im_getnextoption( &p )) )
associated = q;
if( vips_openslideload( filename, &t,
"level", level,
"associated", associated,
NULL ) )
return( -1 );
if( vips_image_write( t, out ) ) {
g_object_unref( t );

View File

@ -293,7 +293,6 @@ static const char *im_Coding[] = {
"RGB_COMPRESSED",
"LUM_COMPRESSED",
"IM_CODING_RAD",
"VIPS_CODING_ARGB",
NULL
};
@ -2099,3 +2098,11 @@ im_cache( VipsImage *in, VipsImage *out,
return( vips_sink_screen( in, out, NULL,
width, height, max, 0, NULL, NULL ) );
}
int
im_argb2rgba( VipsImage *in, VipsImage *out )
{
/* No longer exists, just a null op.
*/
return( im_copy( in, out ) );
}

View File

@ -1138,20 +1138,6 @@ vips_foreign_convert_saveable( VipsForeignSave *save )
in = out;
}
/* If this is a ARGB, we go to png-style RGBA.
*/
if( in->Coding == VIPS_CODING_ARGB ) {
VipsImage *out;
if( vips_argb2rgba( in, &out, NULL ) ) {
g_object_unref( in );
return( -1 );
}
g_object_unref( in );
in = out;
}
/* Get the bands right.
*/
if( in->Coding == VIPS_CODING_NONE ) {
@ -2068,7 +2054,7 @@ vips_openexrload( const char *filename, VipsImage **out, ... )
*
* Optional arguments:
*
* @level: load this level of the pyramid
* @layer: load this layer
* @associated: load this associated image
*
* Read a virtual slide supported by the OpenSlide library into a VIPS image.
@ -2076,9 +2062,10 @@ vips_openexrload( const char *filename, VipsImage **out, ... )
* and Trestle formats.
*
* To facilitate zooming, virtual slide formats include multiple scaled-down
* versions of the high-resolution image.
* versions of the high-resolution image. These are typically called
* "levels", though OpenSlide and im_openslide2vips() call them "layers".
* By default, vips_openslideload() reads the highest-resolution layer
* (level 0). Set @level to the level number you want.
* (layer 0). Set @layer to the layer number you want.
*
* In addition to the slide image itself, virtual slide formats sometimes
* include additional images, such as a scan of the slide's barcode.
@ -2087,10 +2074,10 @@ vips_openexrload( const char *filename, VipsImage **out, ... )
* A slide's associated images are listed in the
* "slide-associated-images" metadata item.
*
* The output of this operator is in Cairo-style pre-multipled ARGB format.
* Use vips_argb2rgba() to decode to png-style RGBA.
* The output of this operator is in pre-multipled ARGB format. Use
* im_argb2rgba() to decode to png-style RGBA.
*
* See also: vips_argb2rgba(), vips_image_new_from_file().
* See also: vips_image_new_from_file().
*
* Returns: 0 on success, -1 on error.
*/

View File

@ -26,6 +26,11 @@
* - turn into a set of read fns ready to be called from a class
* 28/2/12
* - convert "layer" to "level" where externally visible
* 9/4/12
* - move argb2rgba back in here, we don't have a use for coded pixels
* - small cleanups
* 11/4/12
* - fail if both level and associated image are specified
*/
/*
@ -83,8 +88,9 @@ typedef struct {
/* Only valid if associated == NULL.
*/
int32_t layer;
int32_t level;
double downsample;
uint32_t bg;
} ReadSlide;
int
@ -138,19 +144,26 @@ check_associated_image( openslide_t *osr, const char *name )
static ReadSlide *
readslide_new( const char *filename, VipsImage *out,
int layer, const char *associated )
int level, const char *associated )
{
ReadSlide *rslide;
int64_t w, h;
const char *background;
const char * const *properties;
if( level && associated ) {
vips_error( "openslide2vips",
"%s", _( "specify only one of level or associated "
"image" ) );
return( NULL );
}
rslide = VIPS_NEW( out, ReadSlide );
memset( rslide, 0, sizeof( *rslide ) );
g_signal_connect( out, "close", G_CALLBACK( readslide_destroy_cb ),
rslide );
rslide->layer = layer;
rslide->level = level;
rslide->associated = g_strdup( associated );
rslide->osr = openslide_open( filename );
@ -160,8 +173,8 @@ readslide_new( const char *filename, VipsImage *out,
return( NULL );
}
if( layer < 0 ||
layer >= openslide_get_layer_count( rslide->osr ) ) {
if( level < 0 ||
level >= openslide_get_layer_count( rslide->osr ) ) {
vips_error( "openslide2vips",
"%s", _( "invalid slide level" ) );
return( NULL );
@ -180,23 +193,17 @@ readslide_new( const char *filename, VipsImage *out,
}
else {
openslide_get_layer_dimensions( rslide->osr,
layer, &w, &h );
level, &w, &h );
rslide->downsample = openslide_get_layer_downsample(
rslide->osr, layer );
vips_image_set_int( out, "slide-level", layer );
rslide->osr, level );
vips_image_set_int( out, "slide-level", level );
vips_demand_hint( out, VIPS_DEMAND_STYLE_SMALLTILE, NULL );
}
/* This tag is used by argb2rgba() to paint fully-transparent pixels.
*/
background = openslide_get_property_value( rslide->osr,
OPENSLIDE_PROPERTY_NAME_BACKGROUND_COLOR );
if( background != NULL )
vips_image_set_int( out,
VIPS_META_BACKGROUND_RGB,
strtoul( background, NULL, 16 ) );
else
vips_image_set_int( out, VIPS_META_BACKGROUND_RGB, 0xffffff );
rslide->bg = 0xffffff;
if( (background = openslide_get_property_value( rslide->osr,
OPENSLIDE_PROPERTY_NAME_BACKGROUND_COLOR )) )
rslide->bg = strtoul( background, NULL, 16 );
if( w < 0 || h < 0 || rslide->downsample < 0 ) {
vips_error( "openslide2vips", _( "getting dimensions: %s" ),
@ -211,7 +218,7 @@ readslide_new( const char *filename, VipsImage *out,
}
vips_image_init_fields( out, w, h, 4, VIPS_FORMAT_UCHAR,
VIPS_CODING_ARGB, VIPS_INTERPRETATION_RGB, 1.0, 1.0 );
VIPS_CODING_NONE, VIPS_INTERPRETATION_RGB, 1.0, 1.0 );
for( properties = openslide_get_property_names( rslide->osr );
*properties != NULL; properties++ )
@ -228,11 +235,11 @@ readslide_new( const char *filename, VipsImage *out,
int
vips__openslide_read_header( const char *filename, VipsImage *out,
int layer, char *associated )
int level, char *associated )
{
ReadSlide *rslide;
if( !(rslide = readslide_new( filename, out, layer, associated )) )
if( !(rslide = readslide_new( filename, out, level, associated )) )
return( -1 );
return( 0 );
@ -243,30 +250,31 @@ vips__openslide_generate( VipsRegion *out,
void *seq, void *_rslide, void *unused, gboolean *stop )
{
ReadSlide *rslide = _rslide;
uint32_t bg = rslide->bg;
VipsRect *r = &out->valid;
int n = r->width * r->height;
uint32_t *buf = (uint32_t *) VIPS_REGION_ADDR( out, r->left, r->top );
const char *error;
int x, y;
int i;
VIPS_DEBUG_MSG( "vips__openslide_generate: %dx%d @ %dx%d\n",
r->width, r->height, r->left, r->top );
/* Fill in tile-sized chunks. Some versions of OpenSlide can fail for
* very large requests.
/* We're inside a cache, so requests should always be TILE_WIDTH by
* TILE_HEIGHT pixels and on a tile boundary.
*/
for( y = 0; y < r->height; y += TILE_HEIGHT )
for( x = 0; x < r->width; x += TILE_WIDTH ) {
int w = VIPS_MIN( TILE_WIDTH, r->width - x );
int h = VIPS_MIN( TILE_HEIGHT, r->height - y );
g_assert( (r->left % TILE_WIDTH) == 0 );
g_assert( (r->height % TILE_HEIGHT) == 0 );
g_assert( r->width <= TILE_WIDTH );
g_assert( r->height <= TILE_HEIGHT );
openslide_read_region( rslide->osr,
(uint32_t *) VIPS_REGION_ADDR( out,
r->left + x, r->top + y ),
(r->left + x) * rslide->downsample,
(r->top + y) * rslide->downsample,
rslide->layer,
w, h );
}
openslide_read_region( rslide->osr,
buf,
r->left * rslide->downsample,
r->top * rslide->downsample,
rslide->level,
r->width, r->height );
error = openslide_get_error( rslide->osr );
if( error ) {
@ -276,18 +284,41 @@ vips__openslide_generate( VipsRegion *out,
return( -1 );
}
/* Convert from ARGB to RGBA and undo premultiplication.
*/
for( i = 0; i < n; i++ ) {
uint32_t x = buf[i];
uint8_t a = x >> 24;
VipsPel *out = (VipsPel *) (buf + i);
if( a != 0 ) {
out[0] = 255 * ((x >> 16) & 255) / a;
out[1] = 255 * ((x >> 8) & 255) / a;
out[2] = 255 * (x & 255) / a;
out[3] = a;
}
else {
/* Use background color.
*/
out[0] = (bg >> 16) & 255;
out[1] = (bg >> 8) & 255;
out[2] = bg & 255;
out[3] = 0;
}
}
return( 0 );
}
int
vips__openslide_read( const char *filename, VipsImage *out, int layer )
vips__openslide_read( const char *filename, VipsImage *out, int level )
{
ReadSlide *rslide;
VipsImage *raw;
VipsImage *t;
VIPS_DEBUG_MSG( "vips__openslide_read: %s %d\n",
filename, layer );
filename, level );
/* Tile cache: keep enough for two complete rows of tiles. OpenSlide
* has its own tile cache, but it's not large enough for a complete
@ -296,7 +327,7 @@ vips__openslide_read( const char *filename, VipsImage *out, int layer )
raw = vips_image_new();
vips_object_local( out, raw );
if( !(rslide = readslide_new( filename, raw, layer, NULL )) )
if( !(rslide = readslide_new( filename, raw, level, NULL )) )
return( -1 );
if( vips_image_generate( raw,

View File

@ -36,9 +36,9 @@ extern "C" {
int vips__openslide_isslide( const char *filename );
int vips__openslide_read_header( const char *filename, VipsImage *out,
int layer, char *associated );
int level, char *associated );
int vips__openslide_read( const char *filename, VipsImage *out,
int layer );
int level );
int vips__openslide_read_associated( const char *filename, VipsImage *out,
const char *associated );

View File

@ -4,8 +4,8 @@
* - from openslideload.c
* 28/2/12
* - convert "layer" to "level" where externally visible
* 2/4/12
* - output images coded as ARGB
* 11/4/12
* - convert remaining uses of "layer" to "level"
*/
/*
@ -62,9 +62,9 @@ typedef struct _VipsForeignLoadOpenslide {
*/
char *filename;
/* Load this layer.
/* Load this level.
*/
int layer;
int level;
/* Load this associated image.
*/
@ -105,7 +105,7 @@ vips_foreign_load_openslide_header( VipsForeignLoad *load )
VipsForeignLoadOpenslide *openslide = (VipsForeignLoadOpenslide *) load;
if( vips__openslide_read_header( openslide->filename, load->out,
openslide->layer, openslide->associated ) )
openslide->level, openslide->associated ) )
return( -1 );
return( 0 );
@ -118,7 +118,7 @@ vips_foreign_load_openslide_load( VipsForeignLoad *load )
if( !openslide->associated ) {
if( vips__openslide_read( openslide->filename, load->real,
openslide->layer ) )
openslide->level ) )
return( -1 );
}
else {
@ -185,7 +185,7 @@ vips_foreign_load_openslide_class_init( VipsForeignLoadOpenslideClass *class )
_( "Level" ),
_( "Load this level from the file" ),
VIPS_ARGUMENT_OPTIONAL_INPUT,
G_STRUCT_OFFSET( VipsForeignLoadOpenslide, layer ),
G_STRUCT_OFFSET( VipsForeignLoadOpenslide, level ),
0, 100000, 0 );
VIPS_ARG_STRING( class, "associated", 11,

View File

@ -51,8 +51,6 @@ int vips_rad2float( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_float2rad( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_argb2rgba( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_LabS2LabQ( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_LabQ2Lab( VipsImage *in, VipsImage **out, ... )
@ -148,7 +146,6 @@ float im_col_dE00(
int im_LCh2Lab( VipsImage *in, VipsImage *out );
int im_LabQ2XYZ( VipsImage *in, VipsImage *out );
int im_rad2float( VipsImage *in, VipsImage *out );
int im_argb2rgba( VipsImage *in, VipsImage *out );
int im_float2rad( VipsImage *in, VipsImage *out );
int im_LCh2UCS( VipsImage *in, VipsImage *out );
int im_Lab2LCh( VipsImage *in, VipsImage *out );

View File

@ -59,7 +59,6 @@ int vips_check_uncoded( const char *domain, VipsImage *im );
int vips_check_coding_known( const char *domain, VipsImage *im );
int vips_check_coding_labq( const char *domain, VipsImage *im );
int vips_check_coding_rad( const char *domain, VipsImage *im );
int vips_check_coding_argb( const char *domain, VipsImage *im );
int vips_check_coding_noneorlabq( const char *domain, VipsImage *im );
int vips_check_coding_same( const char *domain, VipsImage *im1, VipsImage *im2 );
int vips_check_mono( const char *domain, VipsImage *im );

View File

@ -77,14 +77,6 @@ extern "C" {
*/
#define VIPS_META_RESOLUTION_UNIT "resolution-unit"
/**
* VIPS_META_BACKGROUND_RGB:
*
* The OpenSlide load operator uses this to note the colour to use to paint
* transparent pixels in pre-multiplied ARGB format. See im_argb2rgba().
*/
#define VIPS_META_BACKGROUND_RGB "background-rgb"
guint64 vips_format_sizeof( VipsBandFormat format );
int vips_image_get_width( const VipsImage *image );

View File

@ -198,12 +198,11 @@ typedef enum {
* @VIPS_CODING_NONE: pixels are not coded
* @VIPS_CODING_LABQ: pixels encode 3 float CIELAB values as 4 uchar
* @VIPS_CODING_RAD: pixels encode 3 float RGB as 4 uchar (Radiance coding)
* @VIPS_CODING_ARGB: Cairo-style pre-multiplied ARGB
*
* How pixels are coded.
*
* Normally, pixels are uncoded and can be manipulated as you would expect.
* However some file formats code pixels for storage, and sometimes it's
* However some file formats code pixels for compression, and sometimes it's
* useful to be able to manipulate images in the coded format.
*
* The gaps in the numbering are historical and must be maintained. Allocate
@ -214,8 +213,7 @@ typedef enum {
VIPS_CODING_NONE = 0,
VIPS_CODING_LABQ = 2,
VIPS_CODING_RAD = 6,
VIPS_CODING_ARGB = 7,
VIPS_CODING_LAST = 8
VIPS_CODING_LAST = 7
} VipsCoding;
/* Struct we keep a record of execution time in. Passed to eval signal so
@ -478,7 +476,7 @@ int vips_image_written( VipsImage *image );
void vips_image_invalidate_all( VipsImage *image );
void vips_image_preeval( VipsImage *image );
void vips_image_eval( VipsImage *image, int w, int h );
void vips_image_eval( VipsImage *image, guint64 processed );
void vips_image_posteval( VipsImage *image );
void vips_image_set_progress( VipsImage *image, gboolean progress );

View File

@ -146,6 +146,14 @@ G_STMT_START { \
} \
} G_STMT_END
#define VIPS_CLIP_UINT( V, SEQ ) \
G_STMT_START { \
if( (V) < 0 ) { \
(SEQ)->underflow++; \
(V) = 0; \
} \
} G_STMT_END
#define VIPS_CLIP_NONE( V, SEQ ) {}
const char *vips_enum_string( GType enm, int value );

View File

@ -64,7 +64,6 @@ extern "C" {
#define IM_CODING_NONE VIPS_CODING_NONE
#define IM_CODING_LABQ VIPS_CODING_LABQ
#define IM_CODING_RAD VIPS_CODING_RAD
#define IM_CODING_ARGB VIPS_CODING_ARGB
#define IM_TYPE_MULTIBAND VIPS_INTERPRETATION_MULTIBAND
#define IM_TYPE_B_W VIPS_INTERPRETATION_B_W
@ -649,6 +648,7 @@ int im_mask2vips( DOUBLEMASK *in, VipsImage *out );
int im_bandmean( VipsImage *in, VipsImage *out );
int im_recomb( VipsImage *in, VipsImage *out, DOUBLEMASK *recomb );
int im_argb2rgba( VipsImage *in, VipsImage *out );
/* ruby-vips uses this
*/

View File

@ -74,7 +74,7 @@
/* Largest string we can append in one operation.
*/
#define MAX_STRSIZE (16000)
#define MAX_STRSIZE (100000)
/**
* VIPS_BUF_STATIC:

View File

@ -74,18 +74,23 @@ char *vips__cache_max_files = NULL;
gboolean vips__cache_dump = FALSE;
gboolean vips__cache_trace = FALSE;
/* Max number of cached operations.
/* Max number of cached operations. We are likely to trim due to memuse or
* file use before we hit this limit.
*/
static int vips_cache_max = 10000;
/* How many tracked open files we allow before we start dropping cache.
*/
static int vips_cache_max_files = 900;
static int vips_cache_max_files = 100;
/* How much RAM we spend on caches before we start dropping cached operations
* ... default 1gb.
* ... default 100mb.
*
* It was 1gb, but that's a lot of memory for things like vipsthumbnail where
* there will be (almost) no reuse. Default low and let apps raise it if it'd
* be useful.
*/
static size_t vips_cache_max_mem = 1024 * 1024 * 1024;
static size_t vips_cache_max_mem = 100 * 1024 * 1024;
/* Hold a ref to all "recent" operations.
*/
@ -542,7 +547,8 @@ vips_cache_trim( void )
{
VipsOperation *operation;
while( (g_hash_table_size( vips_cache_table ) > vips_cache_max ||
while( vips_cache_table &&
(g_hash_table_size( vips_cache_table ) > vips_cache_max ||
vips_tracked_get_files() > vips_cache_max_files ||
vips_tracked_get_mem() > vips_cache_max_mem) &&
(operation = vips_cache_select()) ) {

View File

@ -483,7 +483,6 @@ vips_coding_get_type( void )
{VIPS_CODING_NONE, "VIPS_CODING_NONE", "none"},
{VIPS_CODING_LABQ, "VIPS_CODING_LABQ", "labq"},
{VIPS_CODING_RAD, "VIPS_CODING_RAD", "rad"},
{VIPS_CODING_ARGB, "VIPS_CODING_ARGB", "argb"},
{VIPS_CODING_LAST, "VIPS_CODING_LAST", "last"},
{0, NULL, NULL}
};

View File

@ -262,6 +262,12 @@ vips_error_g( GError **error )
if( !vips_domain )
vips_domain = g_quark_from_string( "libvips" );
/* glib does not expect a trailing '\n' and vips always has one.
*/
g_mutex_lock( vips__global_lock );
vips_buf_removec( &vips_error_buf, '\n' );
g_mutex_unlock( vips__global_lock );
g_set_error( error, vips_domain, -1, "%s", vips_error_buffer() );
vips_error_clear();
}
@ -490,8 +496,7 @@ vips_check_coding_known( const char *domain, VipsImage *im )
*/
if( im->Coding != VIPS_CODING_NONE &&
im->Coding != VIPS_CODING_LABQ &&
im->Coding != VIPS_CODING_RAD &&
im->Coding != VIPS_CODING_ARGB ) {
im->Coding != VIPS_CODING_RAD ) {
vips_error( domain, "%s", _( "unknown image coding" ) );
return( -1 );
}
@ -525,32 +530,6 @@ vips_check_coding_rad( const char *domain, VipsImage *im )
return( 0 );
}
/**
* vips_check_coding_argb:
* @domain: the originating domain for the error message
* @im: image to check
*
* Check that the image is in ARGB coding.
* If not, set an error message
* and return non-zero.
*
* See also: vips_error().
*
* Returns: 0 on OK, or -1 on error.
*/
int
vips_check_coding_argb( const char *domain, VipsImage *im )
{
if( im->Coding != VIPS_CODING_ARGB ||
im->BandFmt != VIPS_FORMAT_UCHAR ||
im->Bands != 4 ) {
vips_error( domain, "%s", _( "ARGB coding only" ) );
return( -1 );
}
return( 0 );
}
/**
* vips_check_coding_labq:
* @domain: the originating domain for the error message

View File

@ -456,8 +456,7 @@ vips_image_sanity( VipsObject *object, VipsBuf *buf )
(image->Coding != -1 &&
image->Coding != VIPS_CODING_NONE &&
image->Coding != VIPS_CODING_LABQ &&
image->Coding != VIPS_CODING_RAD &&
image->Coding != VIPS_CODING_ARGB) ||
image->Coding != VIPS_CODING_RAD) ||
image->Type > VIPS_INTERPRETATION_ARRAY ||
image->dtype > VIPS_IMAGE_PARTIAL ||
image->dhint > VIPS_DEMAND_STYLE_ANY )
@ -1093,8 +1092,8 @@ vips_progress_add( VipsImage *image )
return( 0 );
}
void
vips_progress_update( VipsProgress *progress, int w, int h )
static void
vips_progress_update( VipsProgress *progress, guint64 processed )
{
float prop;
@ -1103,11 +1102,11 @@ vips_progress_update( VipsProgress *progress, int w, int h )
g_assert( progress );
progress->run = g_timer_elapsed( progress->start, NULL );
progress->npels += w * h;
progress->npels = processed;
prop = (float) progress->npels / (float) progress->tpels;
progress->percent = 100 * prop;
/* Don't estiomate eta until we are 10% in.
/* Don't estimate eta until we are 10% in.
*/
if( prop > 0.1 )
progress->eta = (1.0 / prop) * progress->run - progress->run;
@ -1136,10 +1135,10 @@ vips_image_preeval( VipsImage *image )
}
}
/* Another w * h pixels have been processed.
/* Updated the number of pixels that have been processed.
*/
void
vips_image_eval( VipsImage *image, int w, int h )
vips_image_eval( VipsImage *image, guint64 processed )
{
if( image->progress_signal ) {
VIPS_DEBUG_MSG( "vips_image_eval: %p\n", image );
@ -1147,7 +1146,7 @@ vips_image_eval( VipsImage *image, int w, int h )
g_assert( vips_object_sanity(
VIPS_OBJECT( image->progress_signal ) ) );
vips_progress_update( image->time, w, h );
vips_progress_update( image->time, processed );
/* For vips7 compat, update the ->time on the signalling image
* too, even though it may have a different width/height to
@ -1155,7 +1154,7 @@ vips_image_eval( VipsImage *image, int w, int h )
*/
if( image->progress_signal->time != image->time )
vips_progress_update( image->progress_signal->time,
w, h );
processed );
g_signal_emit( image->progress_signal,
vips_image_signals[SIG_EVAL], 0, image->time );
@ -1879,7 +1878,7 @@ vips_image_write_line( VipsImage *image, int ypos, VipsPel *linebuffer )
/* Trigger evaluation callbacks for this image.
*/
vips_image_eval( image, image->Xsize, 1 );
vips_image_eval( image, ypos * image->Xsize );
if( vips_image_get_kill( image ) )
return( -1 );

View File

@ -1477,26 +1477,53 @@ vips_object_set_argument_from_string( VipsObject *object,
else if( G_IS_PARAM_SPEC_BOOLEAN( pspec ) ) {
gboolean b;
g_value_init( &gvalue, G_TYPE_BOOLEAN );
b = TRUE;
if( value &&
(strcasecmp( value, "false" ) == 0 ||
strcasecmp( value, "no" ) == 0 ||
strcmp( value, "0" ) == 0) )
b = FALSE;
g_value_init( &gvalue, G_TYPE_BOOLEAN );
g_value_set_boolean( &gvalue, b );
}
else if( G_IS_PARAM_SPEC_INT( pspec ) ) {
int i;
if( sscanf( value, "%d", &i ) != 1 ) {
vips_error( class->nickname,
_( "'%s' is not an integer" ), value );
return( -1 );
}
g_value_init( &gvalue, G_TYPE_INT );
g_value_set_int( &gvalue, atoi( value ) );
g_value_set_int( &gvalue, i );
}
else if( G_IS_PARAM_SPEC_UINT64( pspec ) ) {
/* Not allways the same as guint64 :-( argh.
*/
long long l;
if( sscanf( value, "%Ld", &l ) != 1 ) {
vips_error( class->nickname,
_( "'%s' is not an integer" ), value );
return( -1 );
}
g_value_init( &gvalue, G_TYPE_UINT64 );
g_value_set_uint64( &gvalue, atoll( value ) );
g_value_set_uint64( &gvalue, l );
}
else if( G_IS_PARAM_SPEC_DOUBLE( pspec ) ) {
double d;
if( sscanf( value, "%lg", &d ) != 1 ) {
vips_error( class->nickname,
_( "'%s' is not a double" ), value );
return( -1 );
}
g_value_init( &gvalue, G_TYPE_DOUBLE );
g_value_set_double( &gvalue, atof( value ) );
g_value_set_double( &gvalue, d );
}
else if( G_IS_PARAM_SPEC_ENUM( pspec ) ) {
GEnumValue *enum_value;
@ -1518,8 +1545,16 @@ vips_object_set_argument_from_string( VipsObject *object,
else if( G_IS_PARAM_SPEC_FLAGS( pspec ) ) {
/* Hard to set from a symbolic name. Just take an int.
*/
int i;
if( sscanf( value, "%d", &i ) != 1 ) {
vips_error( class->nickname,
_( "'%s' is not an integer" ), value );
return( -1 );
}
g_value_init( &gvalue, otype );
g_value_set_flags( &gvalue, atoi( value ) );
g_value_set_flags( &gvalue, i );
}
else {
g_value_init( &gvalue, G_TYPE_STRING );

View File

@ -697,6 +697,7 @@ vips_call_options_set( const gchar *option_name, const gchar *value,
vips_call_find_pspec, (void *) name, NULL )) ) {
vips_error( VIPS_OBJECT_GET_CLASS( operation )->nickname,
_( "unknown argument '%s'" ), name );
vips_error_g( error );
return( FALSE );
}
argument_class = argument_instance->argument_class;
@ -705,8 +706,10 @@ vips_call_options_set( const gchar *option_name, const gchar *value,
if( (argument_class->flags & VIPS_ARGUMENT_INPUT) ) {
if( vips_object_set_argument_from_string(
VIPS_OBJECT( operation ),
g_param_spec_get_name( pspec ), value ) )
g_param_spec_get_name( pspec ), value ) ) {
vips_error_g( error );
return( FALSE );
}
#ifdef VIPS_DEBUG
{

View File

@ -211,6 +211,8 @@ vips_sink_base_init( SinkBase *sink_base, VipsImage *image )
vips_get_tile_size( image,
&sink_base->tile_width, &sink_base->tile_height,
&sink_base->nlines );
sink_base->processed = 0;
}
static int
@ -283,6 +285,10 @@ vips_sink_base_allocate( VipsThreadState *state, void *a, gboolean *stop )
*/
sink_base->x += sink_base->tile_width;
/* Add the number of pixels we've just allocated to progress.
*/
sink_base->processed += state->pos.width * state->pos.height;
return( 0 );
}
@ -305,14 +311,12 @@ vips_sink_base_progress( void *a )
{
SinkBase *sink_base = (SinkBase *) a;
VIPS_DEBUG_MSG( "vips_sink_base_progress: %d x %d\n",
sink_base->tile_width, sink_base->tile_height );
VIPS_DEBUG_MSG( "vips_sink_base_progress:\n" );
/* Trigger any eval callbacks on our source image and
* check for errors.
*/
vips_image_eval( sink_base->im,
sink_base->tile_width, sink_base->tile_height );
vips_image_eval( sink_base->im, sink_base->processed );
if( vips_image_get_kill( sink_base->im ) )
return( -1 );

View File

@ -56,6 +56,10 @@ typedef struct _SinkBase {
int tile_height;
int nlines;
/* The number of pixels allocate has allocated. Used for progress
* feedback.
*/
guint64 processed;
} SinkBase;
/* Some function we can share.

View File

@ -396,6 +396,10 @@ wbuffer_allocate_fn( VipsThreadState *state, void *a, gboolean *stop )
*/
sink_base->x += sink_base->tile_width;
/* Add the number of pixels we've just allocated to progress.
*/
sink_base->processed += state->pos.width * state->pos.height;
return( 0 );
}

View File

@ -240,6 +240,10 @@ sink_memory_area_allocate_fn( VipsThreadState *state, void *a, gboolean *stop )
*/
sink_base->x += sink_base->tile_width;
/* Add the number of pixels we've just allocated to progress.
*/
sink_base->processed += state->pos.width * state->pos.height;
return( 0 );
}

View File

@ -89,7 +89,7 @@
/* Temp buffer for snprintf() layer on old systems.
*/
#define MAX_BUF (32768)
#define MAX_BUF (100000)
/* Test two lists for eqality.
*/

View File

@ -188,7 +188,6 @@ image_pixel_length( VipsImage *image )
switch( image->Coding ) {
case VIPS_CODING_LABQ:
case VIPS_CODING_RAD:
case VIPS_CODING_ARGB:
case VIPS_CODING_NONE:
psize = VIPS_IMAGE_SIZEOF_IMAGE( image );
break;

View File

@ -1,255 +1,255 @@
libvips/arithmetic/abs.c
libvips/arithmetic/statistic.c
libvips/arithmetic/im_point_bilinear.c
libvips/arithmetic/im_linreg.c
libvips/arithmetic/arith_dispatch.c
libvips/arithmetic/linear.c
libvips/arithmetic/remainder.c
libvips/arithmetic/multiply.c
libvips/arithmetic/im_maxpos_avg.c
libvips/arithmetic/im_maxpos_vec.c
libvips/arithmetic/min.c
libvips/arithmetic/boolean.c
libvips/arithmetic/arithmetic.c
libvips/arithmetic/add.c
libvips/arithmetic/avg.c
libvips/arithmetic/divide.c
libvips/arithmetic/arith_dispatch.c
libvips/arithmetic/measure.c
libvips/arithmetic/stats.c
libvips/arithmetic/math2.c
libvips/arithmetic/divide.c
libvips/arithmetic/im_linreg.c
libvips/arithmetic/round.c
libvips/arithmetic/measure.c
libvips/arithmetic/math.c
libvips/arithmetic/relational.c
libvips/arithmetic/im_cross_phase.c
libvips/arithmetic/unaryconst.c
libvips/arithmetic/unary.c
libvips/arithmetic/invert.c
libvips/arithmetic/max.c
libvips/arithmetic/complex.c
libvips/arithmetic/avg.c
libvips/arithmetic/deviate.c
libvips/arithmetic/unary.c
libvips/arithmetic/unaryconst.c
libvips/arithmetic/add.c
libvips/arithmetic/arithmetic.c
libvips/arithmetic/multiply.c
libvips/arithmetic/min.c
libvips/arithmetic/im_point_bilinear.c
libvips/arithmetic/complex.c
libvips/arithmetic/im_cross_phase.c
libvips/arithmetic/im_maxpos_avg.c
libvips/arithmetic/invert.c
libvips/arithmetic/remainder.c
libvips/arithmetic/math.c
libvips/arithmetic/abs.c
libvips/arithmetic/relational.c
libvips/arithmetic/binary.c
libvips/arithmetic/subtract.c
libvips/arithmetic/sign.c
libvips/arithmetic/subtract.c
libvips/arithmetic/im_maxpos_vec.c
libvips/arithmetic/statistic.c
libvips/arithmetic/boolean.c
libvips/arithmetic/max.c
libvips/cimg/cimg_dispatch.c
libvips/colour/im_rad2float.c
libvips/colour/im_LCh2UCS.c
libvips/colour/im_icc_transform.c
libvips/colour/disp.c
libvips/colour/im_dE_fromLab.c
libvips/colour/im_Yxy2XYZ.c
libvips/colour/im_LabQ2disp.c
libvips/colour/im_Lab2LabS.c
libvips/colour/im_LabQ2Lab.c
libvips/colour/im_UCS2LCh.c
libvips/colour/im_LabS2Lab.c
libvips/colour/im_dECMC_fromLab.c
libvips/colour/im_LabQ2LabS.c
libvips/colour/im_Lab2XYZ.c
libvips/colour/im_disp2XYZ.c
libvips/colour/im_XYZ2disp.c
libvips/colour/im_LabQ2LabS.c
libvips/colour/im_dECMC_fromLab.c
libvips/colour/colour_dispatch.c
libvips/colour/im_LCh2UCS.c
libvips/colour/im_Lab2LabQ.c
libvips/colour/im_Lab2LabS.c
libvips/colour/im_XYZ2Yxy.c
libvips/colour/im_disp2XYZ.c
libvips/colour/im_UCS2LCh.c
libvips/colour/im_LabQ2Lab.c
libvips/colour/disp.c
libvips/colour/im_LCh2Lab.c
libvips/colour/colour.c
libvips/colour/im_rad2float.c
libvips/colour/im_icc_transform.c
libvips/colour/derived.c
libvips/colour/im_float2rad.c
libvips/colour/im_Lab2LCh.c
libvips/colour/colour_dispatch.c
libvips/colour/derived.c
libvips/colour/im_argb2rgba.c
libvips/colour/im_LabS2LabQ.c
libvips/colour/im_LabS2Lab.c
libvips/colour/im_dE00_fromLab.c
libvips/colour/im_lab_morph.c
libvips/colour/im_XYZ2Yxy.c
libvips/colour/im_Lab2LabQ.c
libvips/colour/im_LCh2Lab.c
libvips/colour/im_XYZ2Lab.c
libvips/conversion/im_gaussnoise.c
libvips/colour/im_Yxy2XYZ.c
libvips/colour/im_lab_morph.c
libvips/colour/im_dE_fromLab.c
libvips/colour/im_Lab2XYZ.c
libvips/colour/im_LabQ2disp.c
libvips/colour/im_LabS2LabQ.c
libvips/conversion/flip.c
libvips/conversion/bandmean.c
libvips/conversion/im_zoom.c
libvips/conversion/im_system.c
libvips/conversion/im_gaussnoise.c
libvips/conversion/bandary.c
libvips/conversion/cast.c
libvips/conversion/conversion.c
libvips/conversion/im_subsample.c
libvips/conversion/im_grid.c
libvips/conversion/extract.c
libvips/conversion/bandjoin.c
libvips/conversion/im_msb.c
libvips/conversion/im_copy_file.c
libvips/conversion/black.c
libvips/conversion/copy.c
libvips/conversion/rot.c
libvips/conversion/im_scale.c
libvips/conversion/replicate.c
libvips/conversion/join.c
libvips/conversion/im_text.c
libvips/conversion/conver_dispatch.c
libvips/conversion/im_scaleps.c
libvips/conversion/im_wrap.c
libvips/conversion/insert.c
libvips/conversion/tilecache.c
libvips/conversion/im_system_image.c
libvips/conversion/embed.c
libvips/conversion/cache.c
libvips/conversion/im_falsecolour.c
libvips/conversion/ifthenelse.c
libvips/conversion/insert.c
libvips/conversion/im_system.c
libvips/conversion/tilecache.c
libvips/conversion/im_text.c
libvips/conversion/im_zoom.c
libvips/conversion/conver_dispatch.c
libvips/conversion/extract.c
libvips/conversion/im_copy_file.c
libvips/conversion/embed.c
libvips/conversion/im_grid.c
libvips/conversion/im_scaleps.c
libvips/conversion/im_scale.c
libvips/conversion/join.c
libvips/conversion/rot.c
libvips/conversion/flip.c
libvips/conversion/copy.c
libvips/conversion/bandary.c
libvips/conversion/im_wrap.c
libvips/conversion/conversion.c
libvips/conversion/recomb.c
libvips/conversion/replicate.c
libvips/conversion/black.c
libvips/conversion/im_msb.c
libvips/conversion/im_system_image.c
libvips/conversion/cache.c
libvips/conversion/im_subsample.c
libvips/conversion/bandjoin.c
libvips/convolution/im_contrast_surface.c
libvips/convolution/im_aconvsep.c
libvips/convolution/im_gradcor.c
libvips/convolution/im_compass.c
libvips/conversion/sequential.c
libvips/convolution/im_conv.c
libvips/convolution/im_fastcor.c
libvips/convolution/convol_dispatch.c
libvips/convolution/im_conv_f.c
libvips/convolution/im_addgnoise.c
libvips/convolution/im_contrast_surface.c
libvips/convolution/im_compass.c
libvips/convolution/im_spcor.c
libvips/convolution/im_sharpen.c
libvips/convolution/im_gradcor.c
libvips/convolution/im_conv_f.c
libvips/convolution/im_aconvsep.c
libvips/convolution/convol_dispatch.c
libvips/convolution/im_aconv.c
libvips/foreign/rawload.c
libvips/foreign/fitssave.c
libvips/foreign/ppmload.c
libvips/foreign/radload.c
libvips/foreign/openslideload.c
libvips/foreign/tiffload.c
libvips/foreign/fitsload.c
libvips/foreign/vipssave.c
libvips/foreign/radsave.c
libvips/foreign/openexrload.c
libvips/foreign/analyzeload.c
libvips/foreign/pngload.c
libvips/foreign/tiffsave.c
libvips/foreign/csv.c
libvips/foreign/vipsload.c
libvips/foreign/magickload.c
libvips/foreign/matload.c
libvips/foreign/jpegload.c
libvips/foreign/openslide2vips.c
libvips/foreign/analyze2vips.c
libvips/foreign/tiff2vips.c
libvips/foreign/jpegsave.c
libvips/convolution/im_addgnoise.c
libvips/convolution/im_sharpen.c
libvips/foreign/rawsave.c
libvips/foreign/ppmsave.c
libvips/foreign/vips2jpeg.c
libvips/foreign/openexr2vips.c
libvips/foreign/radload.c
libvips/foreign/tiffload.c
libvips/foreign/magick2vips.c
libvips/foreign/ppmsave.c
libvips/foreign/vipsload.c
libvips/foreign/pngload.c
libvips/foreign/analyze2vips.c
libvips/foreign/jpeg2vips.c
libvips/foreign/radiance.c
libvips/foreign/openexrload.c
libvips/foreign/tiffsave.c
libvips/foreign/analyzeload.c
libvips/foreign/jpegsave.c
libvips/foreign/vips2jpeg.c
libvips/foreign/ppm.c
libvips/foreign/fitsload.c
libvips/foreign/ppmload.c
libvips/foreign/csvload.c
libvips/foreign/magickload.c
libvips/foreign/openslideload.c
libvips/foreign/csvsave.c
libvips/foreign/jpegload.c
libvips/foreign/rawload.c
libvips/foreign/openexr2vips.c
libvips/foreign/tiff2vips.c
libvips/foreign/csv.c
libvips/foreign/matload.c
libvips/foreign/fitssave.c
libvips/foreign/radsave.c
libvips/foreign/vipssave.c
libvips/foreign/fits.c
libvips/foreign/openslide2vips.c
libvips/foreign/pngsave.c
libvips/foreign/vips2tiff.c
libvips/foreign/foreign.c
libvips/foreign/vipspng.c
libvips/foreign/matlab.c
libvips/foreign/jpeg2vips.c
libvips/foreign/fits.c
libvips/foreign/csvsave.c
libvips/foreign/ppm.c
libvips/foreign/vips2tiff.c
libvips/foreign/radiance.c
libvips/foreign/csvload.c
libvips/foreign/pngsave.c
libvips/foreign/foreign.c
libvips/freq_filt/im_freq_mask.c
libvips/freq_filt/im_phasecor_fft.c
libvips/freq_filt/fmaskcir.c
libvips/freq_filt/im_fractsurf.c
libvips/freq_filt/im_freqflt.c
libvips/freq_filt/im_fractsurf.c
libvips/freq_filt/im_freq_mask.c
libvips/freq_filt/freq_dispatch.c
libvips/freq_filt/im_disp_ps.c
libvips/freq_filt/im_fwfft.c
libvips/freq_filt/im_invfftr.c
libvips/freq_filt/fmaskcir.c
libvips/freq_filt/fmask4th.c
libvips/freq_filt/im_invfft.c
libvips/freq_filt/freq_dispatch.c
libvips/freq_filt/im_rotquad.c
libvips/freq_filt/im_invfftr.c
libvips/freq_filt/im_fwfft.c
libvips/freq_filt/im_disp_ps.c
libvips/histograms_lut/im_gammacorrect.c
libvips/histograms_lut/im_hist.c
libvips/histograms_lut/im_project.c
libvips/histograms_lut/im_stdif.c
libvips/histograms_lut/im_mpercent.c
libvips/histograms_lut/im_histeq.c
libvips/histograms_lut/im_buildlut.c
libvips/histograms_lut/im_histnD.c
libvips/histograms_lut/im_histspec.c
libvips/histograms_lut/im_identity.c
libvips/histograms_lut/im_histindexed.c
libvips/histograms_lut/hist_dispatch.c
libvips/histograms_lut/im_hsp.c
libvips/histograms_lut/im_histgr.c
libvips/histograms_lut/im_buildlut.c
libvips/histograms_lut/tone.c
libvips/histograms_lut/im_histeq.c
libvips/histograms_lut/im_histplot.c
libvips/histograms_lut/im_lhisteq.c
libvips/histograms_lut/im_invertlut.c
libvips/histograms_lut/im_heq.c
libvips/histograms_lut/im_hist.c
libvips/histograms_lut/im_stdif.c
libvips/histograms_lut/im_invertlut.c
libvips/histograms_lut/im_histplot.c
libvips/histograms_lut/im_project.c
libvips/histograms_lut/im_gammacorrect.c
libvips/histograms_lut/im_hsp.c
libvips/histograms_lut/im_mpercent.c
libvips/histograms_lut/im_histgr.c
libvips/histograms_lut/hist_dispatch.c
libvips/histograms_lut/im_histindexed.c
libvips/histograms_lut/tone.c
libvips/histograms_lut/im_lhisteq.c
libvips/histograms_lut/im_identity.c
libvips/histograms_lut/im_maplut.c
libvips/inplace/im_draw_point.c
libvips/inplace/im_draw_line.c
libvips/inplace/im_draw_rect.c
libvips/inplace/im_draw_image.c
libvips/inplace/draw.c
libvips/inplace/flood.c
libvips/inplace/im_draw_smudge.c
libvips/inplace/im_draw_rect.c
libvips/inplace/im_draw_line.c
libvips/inplace/im_draw_circle.c
libvips/inplace/im_draw_mask.c
libvips/inplace/im_draw_smudge.c
libvips/inplace/inplace_dispatch.c
libvips/iofuncs/sink.c
libvips/iofuncs/rect.c
libvips/iofuncs/semaphore.c
libvips/iofuncs/memory.c
libvips/iofuncs/vips.c
libvips/iofuncs/generate.c
libvips/iofuncs/region.c
libvips/iofuncs/init.c
libvips/iofuncs/image.c
libvips/iofuncs/sinkscreen.c
libvips/iofuncs/vector.c
libvips/iofuncs/mapfile.c
libvips/iofuncs/base64.c
libvips/iofuncs/type.c
libvips/iofuncs/object.c
libvips/iofuncs/buf.c
libvips/iofuncs/util.c
libvips/iofuncs/enumtypes.c
libvips/iofuncs/operation.c
libvips/iofuncs/header.c
libvips/iofuncs/sinkmemory.c
libvips/iofuncs/window.c
libvips/iofuncs/sinkdisc.c
libvips/iofuncs/vips.c
libvips/iofuncs/buffer.c
libvips/iofuncs/cache.c
libvips/iofuncs/enumtypes.c
libvips/iofuncs/semaphore.c
libvips/iofuncs/sinkscreen.c
libvips/iofuncs/window.c
libvips/iofuncs/sinkmemory.c
libvips/iofuncs/header.c
libvips/iofuncs/type.c
libvips/iofuncs/image.c
libvips/iofuncs/region.c
libvips/iofuncs/sink.c
libvips/iofuncs/error.c
libvips/iofuncs/util.c
libvips/iofuncs/buf.c
libvips/iofuncs/base64.c
libvips/iofuncs/generate.c
libvips/iofuncs/mapfile.c
libvips/iofuncs/rect.c
libvips/iofuncs/init.c
libvips/iofuncs/object.c
libvips/iofuncs/threadpool.c
libvips/morphology/im_profile.c
libvips/morphology/morphology.c
libvips/morphology/im_label_regions.c
libvips/morphology/morph_dispatch.c
libvips/morphology/im_zerox.c
libvips/iofuncs/memory.c
libvips/iofuncs/cache.c
libvips/morphology/im_cntlines.c
libvips/morphology/im_rank.c
libvips/morphology/im_profile.c
libvips/morphology/morph_dispatch.c
libvips/morphology/im_rank_image.c
libvips/mosaicing/mosaicing_dispatch.c
libvips/mosaicing/im_lrmerge.c
libvips/mosaicing/im_remosaic.c
libvips/mosaicing/im_tbmosaic.c
libvips/mosaicing/im_chkpair.c
libvips/mosaicing/im_tbcalcon.c
libvips/mosaicing/global_balance.c
libvips/mosaicing/im_tbmerge.c
libvips/mosaicing/im_maxpos_subpel.c
libvips/mosaicing/im_improve.c
libvips/mosaicing/im_avgdxdy.c
libvips/mosaicing/im_align_bands.c
libvips/mosaicing/im_lrcalcon.c
libvips/mosaicing/im_initialize.c
libvips/mosaicing/match.c
libvips/morphology/morphology.c
libvips/morphology/im_zerox.c
libvips/morphology/im_label_regions.c
libvips/morphology/im_rank.c
libvips/mosaicing/mosaic1.c
libvips/mosaicing/im_clinear.c
libvips/mosaicing/match.c
libvips/mosaicing/mosaicing_dispatch.c
libvips/mosaicing/im_improve.c
libvips/mosaicing/im_tbmosaic.c
libvips/mosaicing/im_tbmerge.c
libvips/mosaicing/global_balance.c
libvips/mosaicing/im_align_bands.c
libvips/mosaicing/im_lrmerge.c
libvips/mosaicing/im_initialize.c
libvips/mosaicing/im_avgdxdy.c
libvips/mosaicing/im_maxpos_subpel.c
libvips/mosaicing/im_lrmosaic.c
libvips/other/im_grey.c
libvips/mosaicing/im_lrcalcon.c
libvips/mosaicing/im_chkpair.c
libvips/mosaicing/im_remosaic.c
libvips/mosaicing/im_tbcalcon.c
libvips/other/other_dispatch.c
libvips/other/im_benchmark.c
libvips/other/im_zone.c
libvips/other/im_sines.c
libvips/other/im_eye.c
libvips/other/im_make_xy.c
libvips/resample/im_affine.c
libvips/resample/transform.c
libvips/other/im_zone.c
libvips/other/im_eye.c
libvips/other/im_grey.c
libvips/resample/im_shrink.c
libvips/resample/resample_dispatch.c
libvips/resample/interpolate.c
libvips/resample/im_affine.c
libvips/resample/im_rightshift_size.c
libvips/resample/transform.c
libvips/resample/interpolate.c
libvips/video/video_dispatch.c
libvips/video/im_video_test.c
libvips/video/im_video_v4l1.c
@ -264,92 +264,91 @@ libvipsCC/VError.cc
libvipsCC/VImage.cc
libvipsCC/vipsc++.cc
libvipsCC/VMask.cc
libvips/arithmetic/unary.h
libvips/cimg/dummy2.cc
libvips/arithmetic/binary.h
libvips/arithmetic/unaryconst.h
libvips/arithmetic/statistic.h
libvips/arithmetic/arithmetic.h
libvipsCC/include/vips/VDisplay.h
libvips/arithmetic/unary.h
libvipsCC/include/vips/VImage.h
libvipsCC/include/vips/vipscpp.h
libvipsCC/include/vips/VDisplay.h
libvipsCC/include/vips/VError.h
libvipsCC/include/vips/VMask.h
libvipsCC/include/vips/vipsc++.h
libvipsCC/include/vips/VMask.h
libvips/cimg/CImg.h
libvips/conversion/bandary.h
libvips/conversion/conversion.h
libvips/foreign/vipspng.h
libvips/foreign/openexr2vips.h
libvips/foreign/tiff.h
libvips/foreign/jpeg.h
libvips/foreign/radiance.h
libvips/foreign/fits.h
libvips/foreign/analyze2vips.h
libvips/foreign/csv.h
libvips/foreign/ppm.h
libvips/foreign/matlab.h
libvips/conversion/bandary.h
libvips/foreign/dbh.h
libvips/foreign/magick.h
libvips/foreign/matlab.h
libvips/foreign/jpeg.h
libvips/foreign/analyze2vips.h
libvips/foreign/vipspng.h
libvips/foreign/ppm.h
libvips/foreign/csv.h
libvips/foreign/openexr2vips.h
libvips/foreign/openslide2vips.h
libvips/include/vips/type.h
libvips/include/vips/operation.h
libvips/include/vips/deprecated.h
libvips/include/vips/image.h
libvips/foreign/radiance.h
libvips/foreign/magick.h
libvips/foreign/tiff.h
libvips/foreign/fits.h
libvips/include/vips/mosaicing.h
libvips/include/vips/freq_filt.h
libvips/include/vips/buf.h
libvips/include/vips/threadpool.h
libvips/include/vips/header.h
libvips/include/vips/inlines.h
libvips/include/vips/generate.h
libvips/include/vips/cimg_funcs.h
libvips/include/vips/object.h
libvips/include/vips/other.h
libvips/include/vips/util.h
libvips/include/vips/inplace.h
libvips/include/vips/version.h
libvips/include/vips/private.h
libvips/include/vips/conversion.h
libvips/include/vips/almostdeprecated.h
libvips/include/vips/resample.h
libvips/include/vips/dispatch.h
libvips/include/vips/rect.h
libvips/include/vips/semaphore.h
libvips/include/vips/disp.h
libvips/include/vips/colour.h
libvips/include/vips/enumtypes.h
libvips/include/vips/vector.h
libvips/include/vips/intl.h
libvips/include/vips/region.h
libvips/include/vips/morphology.h
libvips/include/vips/format.h
libvips/include/vips/foreign.h
libvips/include/vips/internal.h
libvips/include/vips/interpolate.h
libvips/include/vips/memory.h
libvips/include/vips/transform.h
libvips/include/vips/error.h
libvips/include/vips/basic.h
libvips/include/vips/convolution.h
libvips/include/vips/mask.h
libvips/include/vips/freq_filt.h
libvips/include/vips/cimg_funcs.h
libvips/include/vips/operation.h
libvips/include/vips/vips.h
libvips/include/vips/memory.h
libvips/include/vips/buf.h
libvips/include/vips/dispatch.h
libvips/include/vips/vips7compat.h
libvips/include/vips/debug.h
libvips/include/vips/histograms_lut.h
libvips/include/vips/thread.h
libvips/include/vips/conversion.h
libvips/include/vips/basic.h
libvips/include/vips/inplace.h
libvips/include/vips/relational.h
libvips/include/vips/video.h
libvips/include/vips/mask.h
libvips/include/vips/rect.h
libvips/include/vips/generate.h
libvips/include/vips/arithmetic.h
libvips/include/vips/version.h
libvips/include/vips/util.h
libvips/include/vips/colour.h
libvips/include/vips/threadpool.h
libvips/include/vips/vector.h
libvips/include/vips/morphology.h
libvips/include/vips/error.h
libvips/include/vips/transform.h
libvips/include/vips/region.h
libvips/include/vips/header.h
libvips/include/vips/image.h
libvips/include/vips/intl.h
libvips/include/vips/video.h
libvips/include/vips/enumtypes.h
libvips/include/vips/thread.h
libvips/include/vips/convolution.h
libvips/include/vips/debug.h
libvips/include/vips/interpolate.h
libvips/include/vips/private.h
libvips/include/vips/format.h
libvips/include/vips/object.h
libvips/include/vips/inlines.h
libvips/include/vips/histograms_lut.h
libvips/include/vips/other.h
libvips/include/vips/foreign.h
libvips/include/vips/resample.h
libvips/include/vips/internal.h
libvips/include/vips/disp.h
libvips/include/vips/type.h
libvips/inplace/draw.h
libvips/iofuncs/sink.h
libvips/iofuncs/base64.h
libvips/mosaicing/global_balance.h
libvips/mosaicing/mosaic.h
libvips/mosaicing/merge.h
libvips/mosaicing/global_balance.h
libvips/resample/templates.h
libvips/video/im_video_v4l1.h
libvips/cimg/cimg.cpp
libvips/resample/bicubic.cpp
libvips/resample/nohalo.cpp
libvips/resample/vsqbs.cpp
libvips/resample/nohalo.cpp
libvips/resample/lbb.cpp
libvips/resample/bicubic.cpp

File diff suppressed because it is too large Load Diff

12
python/try4.py Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/python
import sys
from vips8 import vips
from gi.repository import Vips
a = vips.Image(sys.argv[1])
b = vips.Image(sys.argv[2])
c = a.join(b, Vips.Direction.HORIZONTAL, expand = True)
c.write_to_file(sys.argv[3])

View File

@ -942,7 +942,7 @@ parse_options( GOptionContext *context, int *argc, char **argv )
g_error_free( error );
}
error_exit( "%s", g_get_prgname() );
error_exit( NULL );
}
/* We support --plugin and --version for all cases.