phew, done
This commit is contained in:
parent
fdf0c349ae
commit
789e154cd7
7
TODO
7
TODO
|
@ -1,10 +1,3 @@
|
||||||
- seeing transparency when there is none, strange
|
|
||||||
|
|
||||||
- will vips_image_write_prepare() clear to black? check
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- could load pdf thumbnails?
|
- could load pdf thumbnails?
|
||||||
|
|
||||||
- new vips_reduce:
|
- new vips_reduce:
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*/
|
|
||||||
#define VIPS_DEBUG
|
#define VIPS_DEBUG
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -86,15 +86,6 @@ static int
|
||||||
InterlacedOffset[] = { 0, 4, 2, 1 },
|
InterlacedOffset[] = { 0, 4, 2, 1 },
|
||||||
InterlacedJumps[] = { 8, 8, 4, 2 };
|
InterlacedJumps[] = { 8, 8, 4, 2 };
|
||||||
|
|
||||||
/* From ungif.h ... the locations of the transparency, repeat and delay
|
|
||||||
* flags.
|
|
||||||
*/
|
|
||||||
#define GIF_GCE_DELAY_BYTE_LOW 1
|
|
||||||
#define GIF_GCE_DELAY_BYTE_HIGH 2
|
|
||||||
#define GIF_GCE_TRANSPARENCY_BYTE 3
|
|
||||||
#define GIF_NETSCAPE_REPEAT_BYTE_LOW 1
|
|
||||||
#define GIF_NETSCAPE_REPEAT_BYTE_HIGH 2
|
|
||||||
|
|
||||||
/* From gif-lib.h
|
/* From gif-lib.h
|
||||||
*/
|
*/
|
||||||
static const char *
|
static const char *
|
||||||
|
@ -391,9 +382,15 @@ vips_foreign_load_gif_load( VipsForeignLoad *load )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ext_code == GRAPHICS_EXT_FUNC_CODE ) {
|
if( ext_code == GRAPHICS_EXT_FUNC_CODE &&
|
||||||
gif->transparency =
|
extension &&
|
||||||
extension[GIF_GCE_TRANSPARENCY_BYTE];
|
extension[0] == 4 &&
|
||||||
|
extension[1] == 1 ) {
|
||||||
|
/* Bytes are 4, 1, delay low, delay high,
|
||||||
|
* transparency.
|
||||||
|
*/
|
||||||
|
gif->transparency = extension[4];
|
||||||
|
|
||||||
VIPS_DEBUG_MSG( "gifload: "
|
VIPS_DEBUG_MSG( "gifload: "
|
||||||
"seen transparency %d\n",
|
"seen transparency %d\n",
|
||||||
gif->transparency );
|
gif->transparency );
|
||||||
|
@ -405,6 +402,12 @@ vips_foreign_load_gif_load( VipsForeignLoad *load )
|
||||||
vips_foreign_load_gif_error( gif );
|
vips_foreign_load_gif_error( gif );
|
||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef VIPS_DEBUG
|
||||||
|
if( extension )
|
||||||
|
VIPS_DEBUG_MSG( "gifload: "
|
||||||
|
"EXTENSION_NEXT:\n" );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -427,9 +430,11 @@ vips_foreign_load_gif_load( VipsForeignLoad *load )
|
||||||
} while( frame_n <= gif->page &&
|
} while( frame_n <= gif->page &&
|
||||||
record != TERMINATE_RECORD_TYPE );
|
record != TERMINATE_RECORD_TYPE );
|
||||||
|
|
||||||
if( frame_n <= gif->page )
|
if( frame_n <= gif->page ) {
|
||||||
vips_info( class->nickname,
|
vips_error( class->nickname,
|
||||||
"%s", _( "too few frames in GIF file" ) );
|
"%s", _( "too few frames in GIF file" ) );
|
||||||
|
return( -1 );
|
||||||
|
}
|
||||||
|
|
||||||
/* We've rendered to a memory image ... we can shut down the GIF
|
/* We've rendered to a memory image ... we can shut down the GIF
|
||||||
* reader now.
|
* reader now.
|
||||||
|
|
Loading…
Reference in New Issue