neater "header" output

This commit is contained in:
John Cupitt 2013-02-26 13:32:40 +00:00
parent 61875a4bca
commit 25a7b760d0
6 changed files with 25 additions and 32 deletions

View File

@ -1,6 +1,8 @@
22/1/13 started 7.32.0 22/1/13 started 7.32.0
- tilecache in threaded mode could deadlock if the downstream pixel source - tilecache in threaded mode could deadlock if the downstream pixel source
raised an error (thanks Todd) raised an error (thanks Todd)
- fix another dzsave corner-case (thanks Martin)
- neater output for "header"
31/8/12 started 7.31.0 31/8/12 started 7.31.0
- redone im_Lab2XYZ(), im_XYZ2Lab(), im_Lab2LCh(), im_LCh2Lab(), im_UCS2LCh, - redone im_Lab2XYZ(), im_XYZ2Lab(), im_Lab2LCh(), im_LCh2Lab(), im_UCS2LCh,

16
TODO
View File

@ -1,19 +1,3 @@
- on tilecache region error, black out the dead tile and issue a warning,
don't pass the error up the chain
issue a warning too
- fix
$ header test.v
test.v: 14016x16448 uchar, 3 bands, srgb, openin VipsImage (0x907060)
the ", openin VipsImage (0x907060)" is annoying and useless
some hint about the image format might be useful perhaps?
- look at - look at

View File

@ -569,6 +569,7 @@ vips_tile_cache_gen( VipsRegion *or,
{ {
VipsRegion *in = (VipsRegion *) seq; VipsRegion *in = (VipsRegion *) seq;
VipsBlockCache *cache = (VipsBlockCache *) b; VipsBlockCache *cache = (VipsBlockCache *) b;
VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( cache );
VipsRect *r = &or->valid; VipsRect *r = &or->valid;
VipsTile *tile; VipsTile *tile;
@ -641,21 +642,25 @@ vips_tile_cache_gen( VipsRegion *or,
if( cache->threaded ) if( cache->threaded )
g_mutex_lock( cache->lock ); g_mutex_lock( cache->lock );
/* If there was an error calculating this
* tile, just warn and carry on.
*
* This can happen with things like reading
* .scn files via openslide. We don't want the
* read to fail because of one broken tile.
*/
if( result ) { if( result ) {
VIPS_DEBUG_MSG( "vips_tile_cache_gen: " VIPS_DEBUG_MSG( "vips_tile_cache_gen: "
"error on tile %p\n", tile ); "error on tile %p\n", tile );
tile->state = VIPS_TILE_STATE_PEND;
vips_tile_cache_unref( work );
/* Someone might have blocked when vips_warn( class->nickname,
* this tile was a CALC. It's now a _( "error reading tile %dx%d: "
* PEND again, so they must wake up. "%s" ),
*/ tile->pos.left, tile->pos.top,
g_cond_broadcast( cache->new_tile ); vips_error_buffer() );
vips_error_clear();
g_mutex_unlock( cache->lock ); vips_region_black( tile->region );
return( -1 );
} }
tile->state = VIPS_TILE_STATE_DATA; tile->state = VIPS_TILE_STATE_DATA;

View File

@ -460,7 +460,9 @@ struct _VipsObjectClass {
*/ */
void (*summary_class)( struct _VipsObjectClass *, VipsBuf * ); void (*summary_class)( struct _VipsObjectClass *, VipsBuf * );
/* Try to print a one-line summary for the object, handy for debugging. /* Try to print a one-line summary for the object, the user can see
* this output via things like "header fred.tif", --vips-cache-trace,
* etc.
*/ */
void (*summary)( VipsObject *, VipsBuf * ); void (*summary)( VipsObject *, VipsBuf * );

View File

@ -379,6 +379,9 @@ vips_image_dump( VipsObject *object, VipsBuf *buf )
vips_enum_nick( VIPS_TYPE_INTERPRETATION, vips_enum_nick( VIPS_TYPE_INTERPRETATION,
vips_image_get_interpretation( image ) ) ); vips_image_get_interpretation( image ) ) );
vips_buf_appendf( buf, ", %s",
vips_enum_nick( VIPS_TYPE_IMAGE_TYPE, image->dtype ) );
VIPS_OBJECT_CLASS( vips_image_parent_class )->dump( object, buf ); VIPS_OBJECT_CLASS( vips_image_parent_class )->dump( object, buf );
vips_buf_appendf( buf, "\n" ); vips_buf_appendf( buf, "\n" );
@ -412,8 +415,6 @@ vips_image_summary( VipsObject *object, VipsBuf *buf )
vips_enum_nick( VIPS_TYPE_CODING, vips_enum_nick( VIPS_TYPE_CODING,
vips_image_get_coding( image ) ) ); vips_image_get_coding( image ) ) );
} }
vips_buf_appendf( buf, ", %s",
vips_enum_nick( VIPS_TYPE_IMAGE_TYPE, image->dtype ) );
VIPS_OBJECT_CLASS( vips_image_parent_class )->summary( object, buf ); VIPS_OBJECT_CLASS( vips_image_parent_class )->summary( object, buf );
} }

View File

@ -1197,14 +1197,13 @@ vips_object_real_summary_class( VipsObjectClass *class, VipsBuf *buf )
static void static void
vips_object_real_summary( VipsObject *object, VipsBuf *buf ) vips_object_real_summary( VipsObject *object, VipsBuf *buf )
{ {
vips_buf_appendf( buf, " %s (%p)",
G_OBJECT_TYPE_NAME( object ), object );
} }
static void static void
vips_object_real_dump( VipsObject *object, VipsBuf *buf ) vips_object_real_dump( VipsObject *object, VipsBuf *buf )
{ {
vips_buf_appendf( buf, " (%p)", object ); vips_buf_appendf( buf, " %s (%p)",
G_OBJECT_TYPE_NAME( object ), object );
} }
static void static void