()
| 203 | assert wt == 'PDF stream Length incorrect' |
| 204 | |
| 205 | def test_3058(): |
| 206 | doc = pymupdf.Document(os.path.abspath(f'{__file__}/../../tests/resources/test_3058.pdf')) |
| 207 | images = doc[0].get_images(full=True) |
| 208 | pix = pymupdf.Pixmap(doc, 17) |
| 209 | |
| 210 | # First bug was that `pix.colorspace` was DeviceRGB. |
| 211 | assert str(pix.colorspace) == 'Colorspace(CS_CMYK) - DeviceCMYK' |
| 212 | |
| 213 | pix = pymupdf.Pixmap(pymupdf.csRGB, pix) |
| 214 | assert str(pix.colorspace) == 'Colorspace(CS_RGB) - DeviceRGB' |
| 215 | |
| 216 | # Second bug was that the image was converted to RGB via greyscale proofing |
| 217 | # color space, so image contained only shades of grey. This compressed |
| 218 | # easily to a .png file, so we crudely check the bug is fixed by looking at |
| 219 | # size of .png file. |
| 220 | path = os.path.abspath(f'{__file__}/../../tests/test_3058_out.png') |
| 221 | pix.save(path) |
| 222 | s = os.path.getsize(path) |
| 223 | assert 1800000 < s < 2600000, f'Unexpected size of {path}: {s}' |
| 224 | |
| 225 | def test_3072(): |
| 226 | path = os.path.abspath(f'{__file__}/../../tests/resources/test_3072.pdf') |
nothing calls this directly
no test coverage detected
searching dependent graphs…