Merge branch '7.40'
Conflicts: ChangeLog configure.ac
This commit is contained in:
commit
180142b2b1
@ -3,11 +3,17 @@
|
||||
- fix pngload with libpng >1.6.1
|
||||
- add vips_resize()
|
||||
|
||||
21/8/14 started 7.40.7
|
||||
- fix matlab load
|
||||
- fix memleak in tilecache [Lovell]
|
||||
- fix memleak in VipsArray [Lovell]
|
||||
|
||||
12/8/14 started 7.40.6
|
||||
- more doc fixes
|
||||
- fix similarity rotate+scale, thanks Topochicho
|
||||
- fix 16-bit PNG save, thanks John
|
||||
- fix dzsave date on Windows, thanks John
|
||||
- fix vipsthumbnail on many-core systems, thanks James
|
||||
|
||||
25/7/14 started 7.40.5
|
||||
- fix a race in im_maxpos_avg()
|
||||
|
@ -38,7 +38,7 @@ VIPS_VERSION_STRING=$VIPS_VERSION-`date`
|
||||
# binary interface changes not backwards compatible?: reset age to 0
|
||||
|
||||
LIBRARY_CURRENT=38
|
||||
LIBRARY_REVISION=4
|
||||
LIBRARY_REVISION=5
|
||||
LIBRARY_AGE=0
|
||||
|
||||
# patched into include/vips/version.h
|
||||
|
@ -29,6 +29,8 @@
|
||||
* - could deadlock if downstream raised an error (thanks Todd)
|
||||
* 25/4/13
|
||||
* - cache minimisation is optional, see "persistent" flag
|
||||
* 26/8/14 Lovell
|
||||
* - free the hash table in _dispose()
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -156,6 +158,10 @@ vips_block_cache_dispose( GObject *gobject )
|
||||
VIPS_FREEF( vips_g_mutex_free, cache->lock );
|
||||
VIPS_FREEF( vips_g_cond_free, cache->new_tile );
|
||||
|
||||
if( cache->tiles )
|
||||
g_assert( g_hash_table_size( cache->tiles ) == 0 );
|
||||
VIPS_FREEF( g_hash_table_destroy, cache->tiles );
|
||||
|
||||
G_OBJECT_CLASS( vips_block_cache_parent_class )->dispose( gobject );
|
||||
}
|
||||
|
||||
@ -941,7 +947,7 @@ vips_line_cache_build( VipsObject *object )
|
||||
|
||||
vips_get_tile_size( block_cache->in,
|
||||
&tile_width, &tile_height, &nlines );
|
||||
block_cache->max_tiles = 3 *
|
||||
block_cache->max_tiles = 4 *
|
||||
(1 + nlines / block_cache->tile_height);
|
||||
|
||||
VIPS_DEBUG_MSG( "vips_line_cache_build: nlines = %d\n",
|
||||
|
@ -4,6 +4,9 @@
|
||||
* - transpose on load, assemble planes into bands (thanks Mikhail)
|
||||
* 20/12/11
|
||||
* - reworked as some fns ready for new-style classes
|
||||
* 21/8/14
|
||||
* - swap width/height
|
||||
* - set interpretation to rgb16 etc.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -150,6 +153,28 @@ static int mat2vips_formats[][2] = {
|
||||
{ MAT_C_DOUBLE, VIPS_FORMAT_DOUBLE }
|
||||
};
|
||||
|
||||
/* Pick an interpretation.
|
||||
*/
|
||||
static VipsInterpretation
|
||||
mat2vips_pick_interpretation( int bands, VipsBandFormat format )
|
||||
{
|
||||
if( bands == 3 &&
|
||||
vips_band_format_is8bit( format ) )
|
||||
return( VIPS_INTERPRETATION_sRGB );
|
||||
if( bands == 3 &&
|
||||
(format == VIPS_FORMAT_USHORT ||
|
||||
format == VIPS_FORMAT_SHORT) )
|
||||
return( VIPS_INTERPRETATION_RGB16 );
|
||||
if( bands == 1 &&
|
||||
(format == VIPS_FORMAT_USHORT ||
|
||||
format == VIPS_FORMAT_SHORT) )
|
||||
return( VIPS_INTERPRETATION_GREY16 );
|
||||
if( bands > 1 )
|
||||
return( VIPS_INTERPRETATION_MULTIBAND );
|
||||
|
||||
return( VIPS_INTERPRETATION_MULTIBAND );
|
||||
}
|
||||
|
||||
static int
|
||||
mat2vips_get_header( matvar_t *var, VipsImage *im )
|
||||
{
|
||||
@ -165,10 +190,10 @@ mat2vips_get_header( matvar_t *var, VipsImage *im )
|
||||
bands = var->dims[2];
|
||||
|
||||
case 2:
|
||||
height = var->dims[1];
|
||||
width = var->dims[1];
|
||||
|
||||
case 1:
|
||||
width = var->dims[0];
|
||||
height = var->dims[0];
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -177,11 +202,6 @@ mat2vips_get_header( matvar_t *var, VipsImage *im )
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
if( bands > 1 )
|
||||
interpretation = VIPS_INTERPRETATION_MULTIBAND;
|
||||
else
|
||||
interpretation = VIPS_INTERPRETATION_B_W;
|
||||
|
||||
for( i = 0; i < VIPS_NUMBER( mat2vips_formats ); i++ )
|
||||
if( mat2vips_formats[i][0] == var->class_type )
|
||||
break;
|
||||
@ -191,6 +211,7 @@ mat2vips_get_header( matvar_t *var, VipsImage *im )
|
||||
return( -1 );
|
||||
}
|
||||
format = mat2vips_formats[i][1];
|
||||
interpretation = mat2vips_pick_interpretation( bands, format );
|
||||
|
||||
vips_image_init_fields( im,
|
||||
width, height, bands,
|
||||
|
@ -334,6 +334,7 @@ vips_area_free_array_object( GObject **array, VipsArea *area )
|
||||
|
||||
for( i = 0; i < area->n; i++ )
|
||||
VIPS_FREEF( g_object_unref, array[i] );
|
||||
VIPS_FREE( array );
|
||||
|
||||
area->n = 0;
|
||||
}
|
||||
|
@ -318,8 +318,10 @@ thumbnail_open( VipsObject *process, const char *filename )
|
||||
"loading jpeg with factor %d pre-shrink",
|
||||
jpegshrink );
|
||||
|
||||
/* We can't use UNBUFERRED safely on very-many-core systems.
|
||||
*/
|
||||
if( !(im = vips_image_new_from_file( filename,
|
||||
"access", VIPS_ACCESS_SEQUENTIAL_UNBUFFERED,
|
||||
"access", VIPS_ACCESS_SEQUENTIAL,
|
||||
"shrink", jpegshrink,
|
||||
NULL )) )
|
||||
return( NULL );
|
||||
@ -328,7 +330,7 @@ thumbnail_open( VipsObject *process, const char *filename )
|
||||
/* All other formats.
|
||||
*/
|
||||
if( !(im = vips_image_new_from_file( filename,
|
||||
"access", VIPS_ACCESS_SEQUENTIAL_UNBUFFERED,
|
||||
"access", VIPS_ACCESS_SEQUENTIAL,
|
||||
NULL )) )
|
||||
return( NULL );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user