fix filename display in "header" and friends

This commit is contained in:
John Cupitt 2012-02-29 13:49:48 +00:00
parent 6ab6ec410c
commit 58439e31fb
3 changed files with 15 additions and 2 deletions

View File

@ -9,6 +9,9 @@
- new vips_sink_memory() keeps read ordering
- tiff, jpeg, png readers support sequential read
- max/min avoid NaN
- oop, histnorm was broken by the new vipsstats
- never use IM ping to get a header, fixes BMP load
- set @filename for non-vips formats in vips7 compat layer
20/8/11 started 7.27.0
- version bump for new dev cycle

2
TODO
View File

@ -9,6 +9,8 @@ mosaic
- balance should use new meta stuff
- histogram balance option?
resample
========

View File

@ -292,9 +292,17 @@ vips__deprecated_open_read( const char *filename )
*/
IMAGE *image;
if( !(image = vips_image_new()) ||
vips_image_open_lazy( image, format, filename, TRUE ) )
image = vips_image_new();
if( vips_image_open_lazy( image, format, filename, TRUE ) ) {
g_object_unref( image );
return( NULL );
}
/* Yuk. Can't g_object_set() filename since it's after
* construct. Just zap the new filename in.
*/
VIPS_FREE( image->filename );
image->filename = g_strdup( filename );
return( image );
}