Non-destructive Metadata Editing API #1874
Replies: 1 comment 4 replies
-
Personally, I'm fine with adding such a feature as a community contribution in general, but the core team definitely cannot prioritize it right now, which makes it challenging, since even the API/PR review is something that needs a lot of attention from us. Regardless, I can try to support such an effort, but I'm sure it's going to be an enormous amount of work for you. First thoughts: public interface IUpdateImageMetadata
{
void UpdateMetadata(Stream stream, Action<ImageMetadata> updateAction);
Task UpdateMetadataAsync(Stream stream, Action<ImageMetadata> updateAction, CancellationToken cancellationToken);
} Channeling this up to IMO the first step would be to prototype Again: this is going to be a loooong and costly process. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I created this discussion because I can't seem to find any other serious talk about it, only a few comments on issues etc. There is #1784, but it's slightly different and I didn't want to derail that thread.
I am very interested in the ability to edit metadata for images without having to re-save them. Depending on the image format, this would either prevent generational losses, or avoid having to spend CPU re-encoding the image. It's possible in the next few weeks that I might have time to create a PR with this functionality.
I'm wondering if the ImageSharp maintainers would have any suggestions on how that API would look on the front end? A naive method would be to add a new
UpdateMetadata
static function onImage
, that would accept an input stream/path, output stream/path, and anImageMetadata
object.I have a feeling that the ImageSharp maintainers have probably thought a bit more about this than I have though, so I'd appreciate any suggestions or links to existing discussion that I might have missed.
Beta Was this translation helpful? Give feedback.
All reactions