Skip to content

Commit f58e519

Browse files
committed
Remove bitmap save method.
1 parent d6d9e23 commit f58e519

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

src/robotjs.cc

-26
Original file line numberDiff line numberDiff line change
@@ -834,32 +834,6 @@ NAN_METHOD(getColor)
834834

835835
}
836836

837-
NAN_METHOD(saveBitmap)
838-
{
839-
MMBitmapRef bitmap;
840-
MMImageType type = kBMPImageType;
841-
842-
// Get our image object from JavaScript.
843-
BMP img = buildBMP(Nan::To<v8::Object>(info[0]).ToLocalChecked());
844-
845-
char *path;
846-
Nan::Utf8String string(info[1]);
847-
848-
path = *string;
849-
850-
// Create the bitmap.
851-
bitmap = createMMBitmap(img.image, img.width, img.height, img.byteWidth, img.bitsPerPixel, img.bytesPerPixel);
852-
853-
if (saveMMBitmapToFile(bitmap, path, type) != 0) {
854-
return Nan::ThrowError("Could not save image to file.");
855-
}
856-
857-
destroyMMBitmap(bitmap);
858-
859-
info.GetReturnValue().Set(Nan::New(1));
860-
861-
}
862-
863837
NAN_MODULE_INIT(InitAll)
864838
{
865839
Nan::Set(target, Nan::New("dragMouse").ToLocalChecked(),

0 commit comments

Comments
 (0)