Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep metadata when optimizing same format #47

Open
shlagevuk opened this issue Jul 19, 2023 · 1 comment
Open

Keep metadata when optimizing same format #47

shlagevuk opened this issue Jul 19, 2023 · 1 comment

Comments

@shlagevuk
Copy link

Summary

As a user I want to be able to keep Exif/XMP/IPTC or other metadata when optimizing an image, so that metadata affecting image rendering are kept.

Why

As we've discussed on discord I've found that when optimizing a file, yoga strip it from metadata. It result in a change of color of resulting image, weither when optimizing to webp or jpg.

Example file

Below are source file in JPG, and webp image in a zip (github is not compatible with webp upload)
img_webp.zip

img_brute_photoshop.jpg

Raw image from a photoshop export, lot of EXIF metadata
img_brute_photoshop

img_export_gimp_no_exif.webp

Converted image using Gimp, there is still metadata as seen with this extract:

+-- img_export_gimp_no_exif.webp
    +-- RIFF [size: 16697518, formtype: WEBP]
        +-- VP8X [offset: 20, size: 10]
            +-- has_icc: 1
            +-- has_alpha: 0
            +-- has_exif: 1
            +-- has_xmp: 0
            +-- has_anim: 0
            +-- canvas_width: 4252
            +-- canvas_height: 2835
        +-- ICCP [offset: 38, size: 532]
        +-- VP8L [offset: 578, size: 16696926]
        +-- EXIF [offset: 16697512, size: 14]

img_optimized_noresized.webp

Optimised image without resizing, with a loss of color, no metadata.

img_optimized_resized.webp

Optimised image with resizing, same loss of color, no metadata.

@shlagevuk
Copy link
Author

linked to #36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant