Example #1
0
 def test_littleendian_tiff_bytes(self):
     xdpi, ydpi = imagesize.getDPI(
         os.path.join(imagedir_bytes, b"multipage_tiff_example.tif"))
     self.assertEqual(xdpi, -1)
     self.assertEqual(ydpi, -1)
Example #2
0
 def test_png_path(self):
     xdpi, ydpi = imagesize.getDPI(Path(imagedir, "test.png"))
     self.assertEqual(xdpi, 72)
     self.assertEqual(ydpi, 72)
Example #3
0
 def test_bigendian_tiff_bytes(self):
     xdpi, ydpi = imagesize.getDPI(
         os.path.join(imagedir_bytes, b"test.tiff"))
     self.assertEqual(xdpi, -1)
     self.assertEqual(ydpi, -1)
Example #4
0
 def test_svg_bytes(self):
     xdpi, ydpi = imagesize.getDPI(os.path.join(imagedir_bytes,
                                                b"test.svg"))
     self.assertEqual(xdpi, -1)
     self.assertEqual(ydpi, -1)
Example #5
0
 def test_gif(self):
     xdpi, ydpi = imagesize.getDPI(os.path.join(imagedir, "test.gif"))
     self.assertEqual(xdpi, -1)
     self.assertEqual(ydpi, -1)
Example #6
0
 def test_jpeg2000_bytes(self):
     xdpi, ydpi = imagesize.getDPI(os.path.join(imagedir_bytes,
                                                b"test.jp2"))
     self.assertEqual(xdpi, -1)
     self.assertEqual(ydpi, -1)
Example #7
0
 def test_jpeg(self):
     xdpi, ydpi = imagesize.getDPI(os.path.join(imagedir, "test.jpg"))
     self.assertEqual(xdpi, 72)
     self.assertEqual(ydpi, 72)
Example #8
0
 def test_littleendian_tiff_path(self):
     xdpi, ydpi = imagesize.getDPI(
         Path(imagedir, "multipage_tiff_example.tif"))
     self.assertEqual(xdpi, -1)
     self.assertEqual(ydpi, -1)
Example #9
0
 def test_svg_path(self):
     xdpi, ydpi = imagesize.getDPI(Path(imagedir, "test.svg"))
     self.assertEqual(xdpi, -1)
     self.assertEqual(ydpi, -1)
Example #10
0
 def test_bigendian_tiff_path(self):
     xdpi, ydpi = imagesize.getDPI(Path(imagedir, "test.tiff"))
     self.assertEqual(xdpi, -1)
     self.assertEqual(ydpi, -1)
Example #11
0
 def test_jpeg2000_path(self):
     xdpi, ydpi = imagesize.getDPI(Path(imagedir, "test.jp2"))
     self.assertEqual(xdpi, -1)
     self.assertEqual(ydpi, -1)