Skip to content

Binary Snapshot Support #196

@louy2

Description

@louy2

I'd like to test a function rendering to an image, and I want to use snapshot testing. Currently I am using the Debug serializer but the resulting file is larger than my image and diff is useless. I'd really appreciate if I can generate image files and compare them visually, which means having the snapfiles open as image files.

I have thought about writing a serde serializer for image::DynamicImage, but AFAIK insta always adds the header so the resulting file cannot conform to an image format, which may prevent the file from being viewed as an image directly.

The metadata in the headers originally may be placed in EXIF tag UserComment for PNG and JPEG and in Comment Extension for GIF, although image doesn't seem to support metadata when encoding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions