all tests done, all pass with magick6 and magick7
This commit is contained in:
John Cupitt 2016-08-14 18:39:40 +01:00
parent 20298b0d9a
commit 5df5793457
4 changed files with 21 additions and 20 deletions

View File

@ -33,7 +33,7 @@
im_conv*() functions rewritten as classes
- vips_convsep() calls vips_convasep() for the approximate case
- new fixed-point vector path for convi is up to about 2x faster
- gif loader can write 1, 2, 3, or 4 bands depending on file contents
- gif loader can make 1, 2, 3, or 4 bands depending on file contents
- support --strip for pngsave
- add svgz support [Felix Bünemann]
- rename boostrap.sh -> autogen.sh to help snapcraft

11
TODO
View File

@ -1,14 +1,3 @@
- add tests:
load 1 page of a pdf/gif
load all frames from a pdf/gif/dicom/tiff
svg alpha
density
png alpha
dicom
all with file and buffer source
- add APPROX convsep test?
- add more webp tests to py suite

View File

@ -32,8 +32,8 @@
*/
/*
*/
#define DEBUG
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@ -53,6 +53,7 @@ class TestForeign(unittest.TestCase):
self.svgz_file = "images/vips-profile.svgz"
self.svg_gz_file = "images/vips-profile.svg.gz"
self.gif_anim_file = "images/cogs.gif"
self.dicom_file = "images/dicom_test_image.dcm"
self.colour = Vips.Image.jpegload(self.jpeg_file)
self.mono = self.colour.extract_band(1)
@ -329,18 +330,29 @@ class TestForeign(unittest.TestCase):
# we should have rgba for svg files
im = Vips.Image.magickload(self.svg_file)
self.assertEqual(im.bands(), 4)
self.assertEqual(im.bands, 4)
# density should change size of generated svg
im = Vips.Image.magickload(self.svg_file, density = 100)
width = im.width
height = im.height
im = Vips.Image.magickload(self.svg_file, density = 200)
self.assertEqual(im.width, width * 2)
self.assertEqual(im.height, height * 2)
# all-frames should load every frame of the animation
im = Vips.Image.magickload(self.gif_anim_file)
self.assertEqual(im.width(), 85)
self.assertEqual(im.height(), 77)
self.assertEqual(im.bands(), 4)
width = im.width
height = im.height
im = Vips.Image.magickload(self.gif_anim_file, all_frames = True)
self.assertEqual(im.width(), 85)
self.assertEqual(im.height(), 77 * 100)
self.assertEqual(im.bands(), 4)
self.assertEqual(im.width, width)
self.assertEqual(im.height, height * 5)
# should work for dicom
im = Vips.Image.magickload(self.dicom_file)
self.assertEqual(im.width, 128)
self.assertEqual(im.height, 128)
self.assertEqual(im.bands, 1)
def test_webp(self):
x = Vips.type_find("VipsForeign", "webpload")