This commit is contained in:
John Cupitt 2016-07-09 14:15:28 +01:00
parent c0bffd53ad
commit a9d1c654e2
3 changed files with 23 additions and 21 deletions

17
TODO
View File

@ -1,14 +1,17 @@
- try:
$ time vips magickload IMG_0073.JPG x.tif
** VIPS:ERROR:image.c:1593:vips_image_posteval: assertion failed: (progress)
Aborted (core dumped)
vips magickload images/cramps.gif x.png
real 0m0.524s
user 0m0.608s
sys 0m0.120s
we get a four-band png with a strange alpha ... should be 0/255, but it has
greyscale values in
strange!
try with convert, get a one-band png, no alpha at all
- try loading one page of a PDF with the new magickload
- try loading one page of a GIF with the new magickload
- try loading a DICOM
- add more webp tests to py suite

View File

@ -404,11 +404,12 @@ vips_foreign_load_magick7_parse( VipsForeignLoadMagick7 *magick7,
return( 0 );
}
#define UNPACK( TYPE ) { \
TYPE *tq = (TYPE *) q; \
#define UNPACK( TYPE, Q, P, N ) { \
TYPE *tq = (TYPE *) (Q); \
int x; \
\
for( x = 0; x < ne; x++ ) \
tq[x] = p[x]; \
for( x = 0; x < (N); x++ ) \
tq[x] = (P)[x]; \
}
static int
@ -420,7 +421,7 @@ vips_foreign_load_magick7_fill_region( VipsRegion *or,
VipsImage *im = or->im;
const int ne = r->width * im->Bands;
int x, y;
int y;
for( y = 0; y < r->height; y++ ) {
int top = r->top + y;
@ -444,19 +445,19 @@ vips_foreign_load_magick7_fill_region( VipsRegion *or,
switch( im->BandFmt ) {
case VIPS_FORMAT_UCHAR:
UNPACK( unsigned char );
UNPACK( unsigned char, q, p, ne );
break;
case VIPS_FORMAT_USHORT:
UNPACK( unsigned short );
UNPACK( unsigned short, q, p, ne );
break;
case VIPS_FORMAT_FLOAT:
UNPACK( float );
UNPACK( float, q, p, ne );
break;
case VIPS_FORMAT_DOUBLE:
UNPACK( double );
UNPACK( double, q, p, ne );
break;
default:
@ -591,12 +592,12 @@ static int
vips_foreign_load_magick7_file_load( VipsForeignLoad *load )
{
VipsForeignLoadMagick7 *magick7 = (VipsForeignLoadMagick7 *) load;
VipsForeignLoadMagick7File *file = (VipsForeignLoadMagick7File *) load;
#ifdef DEBUG
printf( "vips_foreign_load_magick7_file_load: %p\n", load );
#endif /*DEBUG*/
g_assert( !magick7->image );
magick7->image = ReadImage( magick7->image_info, magick7->exception );
if( !magick7->image ) {
vips_foreign_load_magick7_error( magick7 );
@ -606,8 +607,6 @@ vips_foreign_load_magick7_file_load( VipsForeignLoad *load )
if( vips_foreign_load_magick7_load( magick7 ) )
return( -1 );
VIPS_SETSTR( load->real->filename, file->filename );
return( 0 );
}

View File

@ -1585,12 +1585,12 @@ vips_image_eval( VipsImage *image, guint64 processed )
void
vips_image_posteval( VipsImage *image )
{
if( image->progress_signal ) {
if( image->progress_signal &&
image->progress_signal->time ) {
VipsProgress *progress = image->progress_signal->time;
VIPS_DEBUG_MSG( "vips_image_posteval: %p\n", image );
g_assert( progress );
g_assert( vips_object_sanity(
VIPS_OBJECT( image->progress_signal ) ) );