mirror of
https://github.com/lovell/sharp.git
synced 2025-12-06 03:51:40 +01:00
Ensure Electron support for images with XMP metadata #4451
This commit is contained in:
parent
23a0e81d98
commit
d8686e7c64
@ -16,6 +16,9 @@ slug: changelog/v0.34.4
|
||||
* Ensure `unlimited` flag is passed upstream when reading TIFF images.
|
||||
[#4446](https://github.com/lovell/sharp/issues/4446)
|
||||
|
||||
* Support Electron memory cage when reading XMP metadata (regression in 0.34.3).
|
||||
[#4451](https://github.com/lovell/sharp/issues/4451)
|
||||
|
||||
* Add sharp-libvips rpath for yarn v5 support.
|
||||
[#4452](https://github.com/lovell/sharp/pull/4452)
|
||||
[@arcanis](https://github.com/arcanis)
|
||||
|
||||
@ -261,11 +261,11 @@ class MetadataWorker : public Napi::AsyncWorker {
|
||||
info.Set("iptc", Napi::Buffer<char>::NewOrCopy(env, baton->iptc, baton->iptcLength, sharp::FreeCallback));
|
||||
}
|
||||
if (baton->xmpLength > 0) {
|
||||
info.Set("xmp", Napi::Buffer<char>::NewOrCopy(env, baton->xmp, baton->xmpLength, sharp::FreeCallback));
|
||||
if (g_utf8_validate(static_cast<char const *>(baton->xmp), baton->xmpLength, nullptr)) {
|
||||
info.Set("xmpAsString",
|
||||
Napi::String::New(env, static_cast<char const *>(baton->xmp), baton->xmpLength));
|
||||
}
|
||||
info.Set("xmp", Napi::Buffer<char>::NewOrCopy(env, baton->xmp, baton->xmpLength, sharp::FreeCallback));
|
||||
}
|
||||
if (baton->tifftagPhotoshopLength > 0) {
|
||||
info.Set("tifftagPhotoshop",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user