Merge remote-tracking branch 'origin/7.28'

Conflicts:
	libvips/iofuncs/cache.c
This commit is contained in:
John Cupitt 2012-06-21 13:32:47 +01:00
commit 213b44894e
3 changed files with 16 additions and 8 deletions

View File

@ -5,6 +5,8 @@
- add dzsave, save in deep zoom format
- rework im_shrink() as a class
- remove im_rightshift_size(), just a convenience function now
- vipsthumbnail no longer removes profiles by default
- much more gentle sharpening in thumbnails
18/6/12 started 7.28.8
- fixes for centos5 portability

View File

@ -103,11 +103,10 @@ static GHashTable *vips_cache_table = NULL;
*/
static int vips_cache_time = 0;
/* glib-2.22+ has has funcs for double and int64 hash, but we want to work on
* centos 5 which is 2.12. Switch to g_double_hash() and g_int64_hash() when
* we abandon 5.
/* Old versions of glib are missing these. When we abandon centos 5, switch to
* g_int64_hash() and g_double_hash().
*/
#define INT64_HASH(X) (((unsigned int *)(X))[0] ^ ((unsigned int *)(X))[1])
#define INT64_HASH(X) (((unsigned int *) (X))[0] ^ ((unsigned int *) (X))[1])
#define DOUBLE_HASH(X) (INT64_HASH(X))
/* Pass in the pspec so we can get the generic type. For example, a

View File

@ -27,6 +27,10 @@
* from the input
* 13/6/12
* - update the sequential stuff to the general method
* 21/6/12
* - remove "--nodelete" option, have a --delete option instead, off by
* default
* - much more gentle extra sharpening
*/
#ifdef HAVE_CONFIG_H
@ -48,6 +52,7 @@ static char *interpolator = "bilinear";;
static gboolean nosharpen = FALSE;
static char *export_profile = NULL;
static char *import_profile = NULL;
static gboolean delete_profile = FALSE;
static gboolean nodelete_profile = FALSE;
static gboolean verbose = FALSE;
@ -69,8 +74,10 @@ static GOptionEntry options[] = {
{ "iprofile", 'i', 0, G_OPTION_ARG_STRING, &import_profile,
N_( "import untagged images with PROFILE" ),
N_( "PROFILE" ) },
{ "delete", 'd', 0, G_OPTION_ARG_NONE, &delete_profile,
N_( "delete profile from exported image" ), NULL },
{ "nodelete", 'l', 0, G_OPTION_ARG_NONE, &nodelete_profile,
N_( "don't delete profile from exported image" ), NULL },
N_( "(deprecated, does nothing)" ), NULL },
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
N_( "verbose output" ), NULL },
{ NULL }
@ -123,9 +130,9 @@ sharpen_filter( void )
if( !mask ) {
mask = im_create_imaskv( "sharpen.con", 3, 3,
-1, -1, -1,
-1, 16, -1,
-1, 32, -1,
-1, -1, -1 );
mask->scale = 8;
mask->scale = 24;
}
return( mask );
@ -234,7 +241,7 @@ shrink_factor( IMAGE *in, IMAGE *out,
x = t[7];
}
if( !nodelete_profile ) {
if( delete_profile ) {
if( verbose )
printf( "deleting profile from output image\n" );