in reply to Stopping tests

?? I thought GD::png() was shown to be unsuitable. Unrelated to trouble with tests: I understand the desire to use real-life image, neither too small nor on-the-fly generated gradient, etc. As much as "what else did you expect from Microsoft?" are cheap kind of jokes, consider this: e.g.GD::png() and IM's convert (+ many others I'm sure) produce ~1.2 MB PNG from "CoventryCathedral.jpg", why would your users need to download a ~2,3 MB version for what's really a rather simple module, only because you chose Microsoft Paint for conversion? :-) Actually, this extra megabyte for lossless, decades old codec is quite a "facepalm" thing.

Replies are listed 'Best First'.
Re^2: Stopping tests
by Bod (Parson) on Sep 13, 2023 at 13:49 UTC
    I thought GD::png() was shown to be unsuitable

    My understanding was that GD::jpeg was the unsuitable method due to the format...

    But we are well beyond my understanding of images here...I mostly use GIMP to manually manipulate images and GD to programmatically deal with them. When it gets to the black box of the image itself, my knowledge ends.

    Given that Image::Square produces images that are visually correct, I am wondering if it needs the actual image content to be tested. Perhaps just testing the size and aspect ratio of 1:1 is sufficient for this module...

    Edit:
    Changed link to GitHub repo

      G'day Bod,

      Your link to Image::Square (https://metacpan.org/pod/Image::Square) results in "Not Found". Please fix that.

      After jumping through some hoops I managed to locate and download https://cpan.metacpan.org/authors/id/B/BO/BOD/Image-Square-0.01_3.tar.gz which contained:

      ken@titan ~/tmp/bod_tmp/Image-Square-0.01_3/t $ ls -l total 2601 ... -rw-r--r-- 1 ken None 2315428 Sep 13 07:29 CoventryCathedral.png -rw-r--r-- 1 ken None 330858 Sep 13 07:29 decoration.png ...

      I'm fairly certain that the point the AM was making was in relation to the size of these test files.

      The CoventryCathedral.png image is 1584×625 pixels. I'd suggest creating an image of maybe 15x6 pixels (or similar small size) for testing; this would reduce the size of your test data, and hence your module tarball, by some orders of magnitude.

      — Ken

        The CoventryCathedral.png image is 1584×625 pixels. I'd suggest creating an image of maybe 15x6 pixels (or similar small size) for testing

        Ah...I see!

        I'm reluctant to create a smaller image because in the real world, the module needs to work with all sizes of images. That's why the two test images are different sizes. Some test configurations fail with the larger image but pass with the smaller image. If I use a smaller test image, the test may pass but the module fail when used to process a larger image.

Re^2: Stopping tests
by Bod (Parson) on Sep 13, 2023 at 13:57 UTC

    The conversion from JPEG to PNG has now been done with GIMP and results in a 1.18Mb file.

    This is in the repository ready for the next release...