This commit is contained in:
John Cupitt 2009-08-03 13:17:03 +00:00
parent 856b272259
commit cedb04f0ec
5 changed files with 34 additions and 5 deletions

View File

@ -11,6 +11,8 @@
(thank you Ole)
- im_buildlut() could segv for non-zero based tables (thanks Jack)
- VIPS_BUF_STATIC() does not take length arg
- check for SetImageOption() so we work with GraphicsMagick too
- "header" sets a non-zero exit code if anything failed
- add and use im_check_uncoded() and friends
25/3/09 started 7.18.0

5
TODO
View File

@ -23,7 +23,10 @@
reached im_expntra() in arith
- 1-bit PNG readis broken?
- 1-bit PNG read is broken?
> The bug is that 1bit depth PNG addresses are incorrectly interpreted. At
> least the greyscale ones. I don't recall whether indexed 1 bit works. You

View File

@ -263,6 +263,17 @@ if test x"$with_magick" != "xno"; then
LIBS=$save_LIBS
fi
if test x"$with_magick" != "xno"; then
# we SetImageOption to disable some DICOM read processing, but that's only
# in more recent imagemagicks and not in graphicsmagick
save_LIBS=$LIBS
LIBS="$LIBS $MAGICK_LIBS"
AC_CHECK_FUNCS(SetImageOption,
AC_DEFINE(HAVE_SETIMAGEOPTION,1,
[define if your magick has SetImageOption.]))
LIBS=$save_LIBS
fi
# liboil
AC_ARG_WITH([liboil],
AS_HELP_STRING([--without-liboil], [build without liboil (default: test)]))

View File

@ -29,6 +29,8 @@
* alpha channels
* 12/5/09
* - fix signed/unsigned warnings
* 23/7/09
* - SetImageOption() is optional (to help GM)
*/
/*
@ -593,6 +595,7 @@ im_magick2vips( const char *filename, IMAGE *im )
if( !(read = read_new( filename, im )) )
return( -1 );
#ifdef HAVE_SETIMAGEOPTION
/* When reading DICOM images, we want to ignore any
* window_center/_width setting, since it may put pixels outside the
* 0-65535 range and lose data.
@ -601,6 +604,7 @@ im_magick2vips( const char *filename, IMAGE *im )
* can interpret them if it wants.
*/
SetImageOption( read->image_info, "dcm:display-range", "reset" );
#endif /*HAVE_SETIMAGEOPTION*/
read->image = ReadImage( read->image_info, &read->exception );
if( !read->image ) {

View File

@ -31,6 +31,8 @@
* - use im_history_get()
* 29/2/08
* - don't stop on error
* 23/7/09
* - ... but do return an error code if anything failed
*/
/*
@ -121,7 +123,7 @@ print_header( IMAGE *im )
if( im_header_get( im, main_option_field, &value ) )
return( -1 );
/* Display the save form, if there is one. This was we display
/* Display the save form, if there is one. This way we display
* something useful for ICC profiles, xml fields, etc.
*/
type = G_VALUE_TYPE( &value );
@ -154,6 +156,7 @@ main( int argc, char *argv[] )
GOptionContext *context;
GError *error = NULL;
int i;
int result;
if( im_init_world( argv[0] ) )
error_exit( "unable to start VIPS" );
@ -175,18 +178,24 @@ main( int argc, char *argv[] )
g_option_context_free( context );
result = 0;
for( i = 1; i < argc; i++ ) {
IMAGE *im;
if( !(im = im_open( argv[i], "r" )) )
if( !(im = im_open( argv[i], "r" )) ) {
print_error( "%s: unable to open", argv[i] );
result = 1;
}
if( im && print_header( im ) )
if( im && print_header( im ) ) {
print_error( "%s: unable to print header", argv[i] );
result = 1;
}
if( im )
im_close( im );
}
return( 0 );
return( result );
}