Skip to content

Roundtrip test for encoding and decoding images #3912

@NicolasHug

Description

@NicolasHug

This goal of this issue is to add tests for both jpeg and png implementation on all platforms, to test that:

decode(encode(image)) ~= image.

This test will require an image-comparison util that is robust to minor changes. One possible approach is to compare histograms as done in PIL: https://github.com/python-pillow/Pillow/blob/affa059e959280bf7826ec1a023a64cb8f111b6d/Tests/helper.py#L110-L134

This test is not as robust as the ones we currently have where we individually test encode and decode w.r.t. to a reference implementation (PIL), but it's still good to have as a functional / integration test and it will hopefully help #3913 move forward.

CC @fmassa @datumbox @pmeier

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions