Package: python3-reportlab
Version: 4.3.1-1
Severity: wishlist

$ for file in /usr/share/checkit_tiff/example_configs/*cfg; do checkit_tiff 
$file /usr/share/doc/python3-reportlab/tests/test-cross.tiff; done

says that the tiff file is not valid by any standard. I see issues in the 
output of

$ tiffdump /usr/share/doc/python3-reportlab/tests/test-cross.tiff | egrep 
"Compression|DocumentName|RowsPerStrip|ImageLength|ImageWidth"
ImageWidth (256) SHORT (3) 1<3>
ImageLength (257) SHORT (3) 1<3>
Compression (259) SHORT (3) 1<32946>
DocumentName (269) ASCII (2) 23<C:\tmp\test-cross.tiff\0>
RowsPerStrip (278) SHORT (3) 1<64>

, namely, old compression, a useless document name, and too many rows per strip 
though it's allowed for for the last strip.

Are all these issues intentional, to test forgiveness, perhaps, or an 
oversight? Should test-cross.tiff be standard or substandard?

Looking at the code lines using the file, namely,

    tif = os.path.join(testsFolder,'test-cross.tiff')   #example of a mode '1' 
image
    c.drawInlineImage(tif,1*inch, 1*inch)
    from reportlab.lib.utils import Image as PilImage
    c.drawInlineImage(PilImage.open(tif),1.25*inch, 1*inch)

in the decompression of

/usr/share/doc/python3-reportlab/tests/test_pdfgen_general.py.gz

we see that what is tested is "mode '1'", which, I presume, refers to a 
monochrome image according to 
https://pillow.readthedocs.io/en/latest/handbook/concepts.html, or else this comment is 
incomprehensible.

Suggestion: say what exactly is expected from test-cross.tiff (or testing it) 
in the comment(s) or in 00readme.txt.

Reply via email to