test depth as well in magickload
We were testing width / height / bands when verifying that it was OK to load a toilet-roll image ... of course we should test depth as well.
This commit is contained in:
parent
3a9d322574
commit
9714dcdee3
@ -499,9 +499,13 @@ parse_header( Read *read )
|
|||||||
read->n_pages = GetImageListLength( image );
|
read->n_pages = GetImageListLength( image );
|
||||||
read->n_frames = 0;
|
read->n_frames = 0;
|
||||||
for( p = image; p; (p = GetNextImageInList( p )) ) {
|
for( p = image; p; (p = GetNextImageInList( p )) ) {
|
||||||
|
int p_depth =
|
||||||
|
GetImageChannelDepth( p, AllChannels, &p->exception );
|
||||||
|
|
||||||
if( p->columns != (unsigned int) im->Xsize ||
|
if( p->columns != (unsigned int) im->Xsize ||
|
||||||
p->rows != (unsigned int) im->Ysize ||
|
p->rows != (unsigned int) im->Ysize ||
|
||||||
get_bands( p ) != im->Bands ) {
|
get_bands( p ) != im->Bands ||
|
||||||
|
p_depth != depth ) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf( "frame %d differs\n", read->n_frames );
|
printf( "frame %d differs\n", read->n_frames );
|
||||||
printf( "%zdx%zd, %d bands\n",
|
printf( "%zdx%zd, %d bands\n",
|
||||||
|
@ -581,7 +581,8 @@ vips_foreign_load_magick7_parse( VipsForeignLoadMagick7 *magick7,
|
|||||||
for( p = image; p; (p = GetNextImageInList( p )) ) {
|
for( p = image; p; (p = GetNextImageInList( p )) ) {
|
||||||
if( p->columns != (unsigned int) out->Xsize ||
|
if( p->columns != (unsigned int) out->Xsize ||
|
||||||
p->rows != (unsigned int) out->Ysize ||
|
p->rows != (unsigned int) out->Ysize ||
|
||||||
magick7_get_bands( p ) != out->Bands ) {
|
magick7_get_bands( p ) != out->Bands ||
|
||||||
|
p->depth != image->depth ) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf( "frame %d differs\n", magick7->n_frames );
|
printf( "frame %d differs\n", magick7->n_frames );
|
||||||
printf( "%zdx%zd, %d bands\n",
|
printf( "%zdx%zd, %d bands\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user