fixes
This commit is contained in:
parent
c0bffd53ad
commit
a9d1c654e2
17
TODO
17
TODO
@ -1,14 +1,17 @@
|
|||||||
- try:
|
- try:
|
||||||
|
|
||||||
$ time vips magickload IMG_0073.JPG x.tif
|
vips magickload images/cramps.gif x.png
|
||||||
** VIPS:ERROR:image.c:1593:vips_image_posteval: assertion failed: (progress)
|
|
||||||
Aborted (core dumped)
|
|
||||||
|
|
||||||
real 0m0.524s
|
we get a four-band png with a strange alpha ... should be 0/255, but it has
|
||||||
user 0m0.608s
|
greyscale values in
|
||||||
sys 0m0.120s
|
|
||||||
|
|
||||||
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
|
- add more webp tests to py suite
|
||||||
|
|
||||||
|
@ -404,11 +404,12 @@ vips_foreign_load_magick7_parse( VipsForeignLoadMagick7 *magick7,
|
|||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
#define UNPACK( TYPE ) { \
|
#define UNPACK( TYPE, Q, P, N ) { \
|
||||||
TYPE *tq = (TYPE *) q; \
|
TYPE *tq = (TYPE *) (Q); \
|
||||||
|
int x; \
|
||||||
\
|
\
|
||||||
for( x = 0; x < ne; x++ ) \
|
for( x = 0; x < (N); x++ ) \
|
||||||
tq[x] = p[x]; \
|
tq[x] = (P)[x]; \
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -420,7 +421,7 @@ vips_foreign_load_magick7_fill_region( VipsRegion *or,
|
|||||||
VipsImage *im = or->im;
|
VipsImage *im = or->im;
|
||||||
const int ne = r->width * im->Bands;
|
const int ne = r->width * im->Bands;
|
||||||
|
|
||||||
int x, y;
|
int y;
|
||||||
|
|
||||||
for( y = 0; y < r->height; y++ ) {
|
for( y = 0; y < r->height; y++ ) {
|
||||||
int top = r->top + y;
|
int top = r->top + y;
|
||||||
@ -444,19 +445,19 @@ vips_foreign_load_magick7_fill_region( VipsRegion *or,
|
|||||||
|
|
||||||
switch( im->BandFmt ) {
|
switch( im->BandFmt ) {
|
||||||
case VIPS_FORMAT_UCHAR:
|
case VIPS_FORMAT_UCHAR:
|
||||||
UNPACK( unsigned char );
|
UNPACK( unsigned char, q, p, ne );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VIPS_FORMAT_USHORT:
|
case VIPS_FORMAT_USHORT:
|
||||||
UNPACK( unsigned short );
|
UNPACK( unsigned short, q, p, ne );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VIPS_FORMAT_FLOAT:
|
case VIPS_FORMAT_FLOAT:
|
||||||
UNPACK( float );
|
UNPACK( float, q, p, ne );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VIPS_FORMAT_DOUBLE:
|
case VIPS_FORMAT_DOUBLE:
|
||||||
UNPACK( double );
|
UNPACK( double, q, p, ne );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -591,12 +592,12 @@ static int
|
|||||||
vips_foreign_load_magick7_file_load( VipsForeignLoad *load )
|
vips_foreign_load_magick7_file_load( VipsForeignLoad *load )
|
||||||
{
|
{
|
||||||
VipsForeignLoadMagick7 *magick7 = (VipsForeignLoadMagick7 *) load;
|
VipsForeignLoadMagick7 *magick7 = (VipsForeignLoadMagick7 *) load;
|
||||||
VipsForeignLoadMagick7File *file = (VipsForeignLoadMagick7File *) load;
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf( "vips_foreign_load_magick7_file_load: %p\n", load );
|
printf( "vips_foreign_load_magick7_file_load: %p\n", load );
|
||||||
#endif /*DEBUG*/
|
#endif /*DEBUG*/
|
||||||
|
|
||||||
|
g_assert( !magick7->image );
|
||||||
magick7->image = ReadImage( magick7->image_info, magick7->exception );
|
magick7->image = ReadImage( magick7->image_info, magick7->exception );
|
||||||
if( !magick7->image ) {
|
if( !magick7->image ) {
|
||||||
vips_foreign_load_magick7_error( magick7 );
|
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 ) )
|
if( vips_foreign_load_magick7_load( magick7 ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
VIPS_SETSTR( load->real->filename, file->filename );
|
|
||||||
|
|
||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1585,12 +1585,12 @@ vips_image_eval( VipsImage *image, guint64 processed )
|
|||||||
void
|
void
|
||||||
vips_image_posteval( VipsImage *image )
|
vips_image_posteval( VipsImage *image )
|
||||||
{
|
{
|
||||||
if( image->progress_signal ) {
|
if( image->progress_signal &&
|
||||||
|
image->progress_signal->time ) {
|
||||||
VipsProgress *progress = image->progress_signal->time;
|
VipsProgress *progress = image->progress_signal->time;
|
||||||
|
|
||||||
VIPS_DEBUG_MSG( "vips_image_posteval: %p\n", image );
|
VIPS_DEBUG_MSG( "vips_image_posteval: %p\n", image );
|
||||||
|
|
||||||
g_assert( progress );
|
|
||||||
g_assert( vips_object_sanity(
|
g_assert( vips_object_sanity(
|
||||||
VIPS_OBJECT( image->progress_signal ) ) );
|
VIPS_OBJECT( image->progress_signal ) ) );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user