Does ImageMagick preserve XMP when converting to webp?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
carlseibert
Posts: 9
Joined: 2017-07-21T11:57:30-07:00
Authentication code: 1151

Does ImageMagick preserve XMP when converting to webp?

Post by carlseibert » 2018-02-28T18:30:26-07:00

I don't have a program that will read metadata from WEBP images, so I can't test this for myself.

Does IM preserve XMP metadata (specifically the IPTC fields in the XMP) when converting from JPEG to WEBP? Or when resizing WEBPs, for that matter?

This will matter if WEBP ever gains acceptance. WEBPs will need to convey descriptive and copyright management information if they are to be published/distributed on the internet, as per the DMCA and, well, neighborly-ness.

User avatar
magick
Site Admin
Posts: 10807
Joined: 2003-05-31T11:32:55-07:00

Re: Does ImageMagick preserve XMP when converting to webp?

Post by magick » 2018-02-28T19:46:22-07:00

Recent releases of ImageMagick preserves ICC, EXIF, and XMP profiles to the WEBP image format.

carlseibert
Posts: 9
Joined: 2017-07-21T11:57:30-07:00
Authentication code: 1151

Re: Does ImageMagick preserve XMP when converting to webp?

Post by carlseibert » 2018-04-27T15:57:59-07:00

Thanks!

For some reason, I never saw/got the email that you had responded.

I just saw my own question in a search and noticed that you had answered :shock:

Keep up the good work.

-Carl

carlseibert
Posts: 9
Joined: 2017-07-21T11:57:30-07:00
Authentication code: 1151

Re: Does ImageMagick preserve XMP when converting to webp?

Post by carlseibert » 2018-04-28T19:03:13-07:00

Oh dear.

When I tried it, I got no metadata. Like so,

Carls-MacBook-Pro-2:webp carl$ convert test_IM.jpg test3.webp
Carls-MacBook-Pro-2:webp carl$ exiftool -a -G1 test_IM.jpg | grep Description
[XMP-dc] Description : The glorious light of late afternoon finds a African Iris growing in Bonnie's garden. I needed a sample shoot, so I shot some of Bonnie's flowers on April 13, 2017. Photo by Carl Seibert/Creative Commons BY-NC-ND4 (Please link photographer's name to https://www.carlseibert.com/commons )
Carls-MacBook-Pro-2:webp carl$ exiftool -a -G1 test3.webp | grep Description
Carls-MacBook-Pro-2:webp carl$

Am I doing something incorrectly here?

This with IM 7.0.7-28

Carls-MacBook-Pro-2:webp carl$ magick --version
Version: ImageMagick 7.0.7-28 Q16 x86_64 2018-04-28 http://www.imagemagick.org

carlseibert
Posts: 9
Joined: 2017-07-21T11:57:30-07:00
Authentication code: 1151

Re: Does ImageMagick preserve XMP when converting to webp?

Post by carlseibert » 2018-04-28T19:16:04-07:00

This may help:

Carls-MacBook-Pro-2:webp carl$ convert test3.webp profile.xmp
Decoded /var/folders/ww/bw359dcn20d7nw0tdvyr82xc0000gp/T/magick-74942_X278i6tu9xt. Dimensions: 2048 x 673 . Format: lossy. Now saving...
Saved file /var/folders/ww/bw359dcn20d7nw0tdvyr82xc0000gp/T/magick-74942z0_ZUlwbMg1R
convert: no APP1 data is available `profile.xmp' @ error/meta.c/WriteMETAImage/2388.

And I sanity checked by converting that same JPEG, JPEG-to-JPEG, and all was well.

carlseibert
Posts: 9
Joined: 2017-07-21T11:57:30-07:00
Authentication code: 1151

Re: Does ImageMagick preserve XMP when converting to webp?

Post by carlseibert » 2018-05-14T11:46:38-07:00

Bump.

User avatar
magick
Site Admin
Posts: 10807
Joined: 2003-05-31T11:32:55-07:00

Re: Does ImageMagick preserve XMP when converting to webp?

Post by magick » 2018-05-14T17:29:19-07:00

Profile support requires libwebpmux, version 0.4.4 or above. Was your instance of IM built with libwebpmux?

carlseibert
Posts: 9
Joined: 2017-07-21T11:57:30-07:00
Authentication code: 1151

Re: Does ImageMagick preserve XMP when converting to webp?

Post by carlseibert » 2018-05-19T12:28:59-07:00

Hmmm. I'm away from that machine right now. I'll check when I get back.

carlseibert
Posts: 9
Joined: 2017-07-21T11:57:30-07:00
Authentication code: 1151

Re: Does ImageMagick preserve XMP when converting to webp?

Post by carlseibert » 2018-05-19T15:34:03-07:00

Hi,

On my Fedora 27 machine, I have libwebp 0.6.0-4 installed, it allegedly includes libwebpmux

On my Mac, I also have webp support installed, but I can't quite figure out how to convince homebrew to tell me exactly which libraries are included or their version numbers.

Both instances can convert a file to WEBP. Both return the same error about "no APP1 data is available 'profile.xmp' "when I attempt to read the profile in ImageMagick.

And if I read the metadata from a resulting WEBP in ExifTool, nothing from XMP is returned.

Post Reply