more fixes
This commit is contained in:
parent
8432e1bff1
commit
f78816e00f
@ -33,6 +33,7 @@
|
||||
- added "-rotate" option to vips2dj
|
||||
- added man page for im_resize_linear
|
||||
- better jpeg-in-tiff YCbCr read (thanks Ole)
|
||||
- oops, invalidatefns were not being freed on im__close()
|
||||
|
||||
25/1/08 started 7.14.0
|
||||
- bump all version numbers for new stable
|
||||
|
8
TODO
8
TODO
@ -1,3 +1,11 @@
|
||||
- im__close() has
|
||||
|
||||
g_assert( !im->regions );
|
||||
while( im->regions )
|
||||
im_region_free( (REGION *) im->regions->data );
|
||||
|
||||
remove the while() loop?
|
||||
|
||||
- wrap meta() stuff in C++, we need it in py as well
|
||||
|
||||
- try
|
||||
|
@ -141,6 +141,8 @@ 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 * );
|
||||
|
@ -538,7 +538,7 @@ im__link_mapp( IMAGE *im, VSListMap2Fn fn, int *serial, void *a, void *b )
|
||||
(VSListMap4Fn) im__link_mapp, fn, serial, a, b ) );
|
||||
}
|
||||
|
||||
/* Apply a function to an image and all it's parents, direct and indirect.
|
||||
/* Apply a function to an image and all it's parents, direct and indirect.
|
||||
*/
|
||||
void *
|
||||
im__link_map( IMAGE *im, VSListMap2Fn fn, void *a, void *b )
|
||||
|
@ -54,6 +54,8 @@
|
||||
* - free history_list
|
||||
* 7/11/07
|
||||
* - added preclose, removed evalend triggers
|
||||
* 23/7/08
|
||||
* - im__close() will no longer free regions
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -142,16 +144,17 @@ im__close( IMAGE *im )
|
||||
result |= im__trigger_callbacks( im->preclosefns );
|
||||
IM_FREEF( im_slist_free_all, im->preclosefns );
|
||||
|
||||
/* Free any regions defined on this image. This will, in turn, call
|
||||
* all stop functions still running, freeing all regions we have on
|
||||
* other images, etc.
|
||||
/* Should be no regions defined on the image. im_close() ought to put
|
||||
* us into a zombie state if there are, im__close() should not be
|
||||
* called on images with running regions.
|
||||
*/
|
||||
#ifdef DEBUG_IO
|
||||
printf( "im__close: freeing %d regions ..\n",
|
||||
g_slist_length( (List *) im->regions ) );
|
||||
#endif /*DEBUG_IO*/
|
||||
while( im->regions )
|
||||
im_region_free( (REGION *) im->regions->data );
|
||||
if( im->regions ) {
|
||||
GSList *p;
|
||||
|
||||
printf( "** im__close: leaked regions!\n" );
|
||||
for( p = im->regions; p; p = p->next )
|
||||
im_region_print( (REGION *) p->data );
|
||||
}
|
||||
|
||||
/* That should mean we have no windows.
|
||||
*/
|
||||
@ -163,12 +166,12 @@ im__close( IMAGE *im )
|
||||
im_window_print( (im_window_t *) p->data );
|
||||
}
|
||||
|
||||
/* Make sure all evalend functions have been called, perform all close
|
||||
* callbacks, and free eval callbacks.
|
||||
/* Junk all callbacks, perform close callbacks.
|
||||
*/
|
||||
IM_FREEF( im_slist_free_all, im->evalstartfns );
|
||||
IM_FREEF( im_slist_free_all, im->evalfns );
|
||||
IM_FREEF( im_slist_free_all, im->evalendfns );
|
||||
IM_FREEF( im_slist_free_all, im->invalidatefns );
|
||||
result |= im__trigger_callbacks( im->closefns );
|
||||
IM_FREEF( im_slist_free_all, im->closefns );
|
||||
|
||||
|
@ -33,6 +33,8 @@
|
||||
* - im_region_image() only sets r, not whole image
|
||||
* 1'2'07
|
||||
* - gah, im_region_image() could still break (thanks Mikkel)
|
||||
* 23/7/08
|
||||
* - added im_region_print()
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -601,3 +603,23 @@ im_region_fill( REGION *reg, Rect *r, im_region_fill_fn fn, void *a )
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/* Handy for debug.
|
||||
*/
|
||||
void
|
||||
im_region_print( REGION *region )
|
||||
{
|
||||
printf( "REGION: %p, ", region );
|
||||
printf( "im = %p, ", region->im );
|
||||
printf( "valid.left = %d, ", region->valid.left );
|
||||
printf( "valid.top = %d, ", region->valid.top );
|
||||
printf( "valid.width = %d, ", region->valid.width );
|
||||
printf( "valid.height = %d, ", region->valid.height );
|
||||
printf( "type = %d, ", region->type );
|
||||
printf( "data = %p, ", region->data );
|
||||
printf( "bpl = %d, ", region->bpl );
|
||||
printf( "seq = %p, ", region->seq );
|
||||
printf( "thread = %p, ", region->thread );
|
||||
printf( "window = %p, ", region->window );
|
||||
printf( "buffer = %p\n", region->buffer );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user