tests pass
This commit is contained in:
parent
5fae93bc61
commit
43395d4e7b
@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
#ifdef HAVE_MAGICK7
|
#ifdef HAVE_MAGICK7
|
||||||
|
|
||||||
#include <MagickWand/MagickWand.h>
|
#include <MagickCore/MagickCore.h>
|
||||||
|
|
||||||
typedef struct _VipsForeignLoadMagick7 {
|
typedef struct _VipsForeignLoadMagick7 {
|
||||||
VipsForeignLoad parent_object;
|
VipsForeignLoad parent_object;
|
||||||
@ -336,6 +336,8 @@ vips_foreign_load_magick7_parse( VipsForeignLoadMagick7 *magick7,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
/* Things like GIF have no resolution info.
|
||||||
|
*/
|
||||||
out->Xres = 1.0;
|
out->Xres = 1.0;
|
||||||
out->Yres = 1.0;
|
out->Yres = 1.0;
|
||||||
break;
|
break;
|
||||||
|
@ -314,17 +314,12 @@ class TestForeign(unittest.TestCase):
|
|||||||
return
|
return
|
||||||
|
|
||||||
def gif_valid(self, im):
|
def gif_valid(self, im):
|
||||||
a = im(10, 10)
|
|
||||||
# some libMagick produce an RGB for this image, some a mono, some
|
# some libMagick produce an RGB for this image, some a mono, some
|
||||||
# rgba :-(
|
# rgba, some have a valid alpha, some don't :-(
|
||||||
if len(a) == 4:
|
# therefore ... just test channel 0
|
||||||
self.assertAlmostEqual(a, [33, 33, 33, 255])
|
a = im(10, 10)[0]
|
||||||
elif len(a) == 3:
|
|
||||||
self.assertAlmostEqual(a, [33, 33, 33])
|
|
||||||
else:
|
|
||||||
self.assertAlmostEqual(a, [33])
|
|
||||||
|
|
||||||
self.assertEqual(im.bands, len(a))
|
self.assertAlmostEqual(a, 33)
|
||||||
self.assertEqual(im.width, 159)
|
self.assertEqual(im.width, 159)
|
||||||
self.assertEqual(im.height, 203)
|
self.assertEqual(im.height, 203)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user