feat: add safer nativeImage.createFromBitmap(), which does not decode PNG/JPEG (#17337)
This commit is contained in:
parent
aa8b66aae1
commit
878538f2e8
4 changed files with 91 additions and 1 deletions
|
@ -51,6 +51,10 @@ class NativeImage : public mate::Wrappable<NativeImage> {
|
|||
size_t length);
|
||||
static mate::Handle<NativeImage> CreateFromPath(v8::Isolate* isolate,
|
||||
const base::FilePath& path);
|
||||
static mate::Handle<NativeImage> CreateFromBitmap(
|
||||
mate::Arguments* args,
|
||||
v8::Local<v8::Value> buffer,
|
||||
const mate::Dictionary& options);
|
||||
static mate::Handle<NativeImage> CreateFromBuffer(
|
||||
mate::Arguments* args,
|
||||
v8::Local<v8::Value> buffer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue