block resolutions < 0
since they can trigger a sanity failure in the test suite
This commit is contained in:
parent
1b97b52318
commit
9713a71bf0
@ -464,8 +464,10 @@ vips_image_resolution_from_exif( VipsImage *image, ExifData *ed )
|
|||||||
"seen exif resolution %g, %g p/mm\n", xres, yres );
|
"seen exif resolution %g, %g p/mm\n", xres, yres );
|
||||||
#endif /*DEBUG*/
|
#endif /*DEBUG*/
|
||||||
|
|
||||||
image->Xres = xres;
|
/* Don't allow negative resolution.
|
||||||
image->Yres = yres;
|
*/
|
||||||
|
image->Xres = VIPS_MAX( 0, xres );
|
||||||
|
image->Yres = VIPS_MAX( 0, yres );
|
||||||
|
|
||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
@ -1014,8 +1014,8 @@ vips_image_init_fields( VipsImage *image,
|
|||||||
|
|
||||||
image->Coding = coding;
|
image->Coding = coding;
|
||||||
image->Type = interpretation;
|
image->Type = interpretation;
|
||||||
image->Xres = xres;
|
image->Xres = VIPS_MAX( 0, xres );
|
||||||
image->Yres = yres;
|
image->Yres = VIPS_MAX( 0, yres );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
|
Loading…
Reference in New Issue
Block a user