test band fold/unfold factors
This commit is contained in:
parent
d7d8e03a86
commit
e107dd11c0
2
TODO
2
TODO
@ -1,5 +1,3 @@
|
|||||||
- tests for band fold/unfold with factor
|
|
||||||
|
|
||||||
- how about something like vips_grid() which turns a tall thin one-band
|
- how about something like vips_grid() which turns a tall thin one-band
|
||||||
image into a much smaller many-band image?
|
image into a much smaller many-band image?
|
||||||
|
|
||||||
|
@ -237,6 +237,15 @@ class TestConversion(unittest.TestCase):
|
|||||||
self.assertEqual(y.bands, 1)
|
self.assertEqual(y.bands, 1)
|
||||||
self.assertEqual(x.avg(), y.avg())
|
self.assertEqual(x.avg(), y.avg())
|
||||||
|
|
||||||
|
x = self.mono.bandfold(factor = 2)
|
||||||
|
self.assertEqual(x.width, self.mono.width / 2)
|
||||||
|
self.assertEqual(x.bands, 2)
|
||||||
|
|
||||||
|
y = x.bandunfold(factor = 2)
|
||||||
|
self.assertEqual(y.width, self.mono.width)
|
||||||
|
self.assertEqual(y.bands, 1)
|
||||||
|
self.assertEqual(x.avg(), y.avg())
|
||||||
|
|
||||||
def test_byteswap(self):
|
def test_byteswap(self):
|
||||||
x = self.mono.cast("ushort")
|
x = self.mono.cast("ushort")
|
||||||
y = x.byteswap().byteswap()
|
y = x.byteswap().byteswap()
|
||||||
|
Loading…
Reference in New Issue
Block a user