govips icon indicating copy to clipboard operation
govips copied to clipboard

Don’t strip the color profile when stripping metadata

Open eelco opened this issue 3 years ago • 2 comments

When using the generic StripMetadata option, vips strips all fields, also those that are technically not “meta” data, but a key part of the data such as the color profile. This seems by design in vips (https://github.com/libvips/libvips/issues/1026), but it would be great if GoVips would improve on this, or at least offer the option to do so.

eelco avatar Oct 25 '21 14:10 eelco

Hey eelco I think this is a great idea. Would you be willing to set up a simple PR? I would expect to review and merge it quickly!

Thanks for the contribution!

tonimelisma avatar Oct 25 '21 16:10 tonimelisma

Did you try imageRef.RemoveMetadata()?

You'll need to set the StripMetadata option on export(/import) to False.

Elad-Laufer avatar Nov 22 '21 13:11 Elad-Laufer