netpyoung / unity.webp

:art: WebP made easy for Unity3d
https://netpyoung.github.io/unity.webp/
MIT License
251 stars 30 forks source link

Adding EXIF / Metadata to images #68

Open tomjerbo opened 1 week ago

tomjerbo commented 1 week ago

Hi! First off, this package is awesome!

I'm a noob at this and I'm trying to add a custom string with my own data onto the images before saving them to disc and I couldn't find any methods that allows me to do that. In the WebPPicture struct there is fields for extra_info_type and extra_info that I'm guessing might be used for metadata?

If it's not already a thing and I've just missed it, would adding metadata functionality be a possibility?

netpyoung commented 1 week ago

that will be good feature easy to getting metadata . actually there is API example written in C++ It should be rewritten in dotnet also to support in unity.webp.

tomjerbo commented 1 week ago

I don't know C++ and reading the api there's examples of extracting the metadata, will it be possible to write it as well using the demuxer?

If it's something you're planning to add support for, for my use case, being able to write metadata onto the byte[] that you get returned from Texture2D.EncodeToWebP or being able to send the metadata in as an argument for the method would be optimal.