Skip to content

Commit

Permalink
Remove bitmap save method.
Browse files Browse the repository at this point in the history
  • Loading branch information
octalmage committed Oct 15, 2016
1 parent d6d9e23 commit f58e519
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions src/robotjs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -834,32 +834,6 @@ NAN_METHOD(getColor)

}

NAN_METHOD(saveBitmap)
{
MMBitmapRef bitmap;
MMImageType type = kBMPImageType;

// Get our image object from JavaScript.
BMP img = buildBMP(Nan::To<v8::Object>(info[0]).ToLocalChecked());

char *path;
Nan::Utf8String string(info[1]);

path = *string;

// Create the bitmap.
bitmap = createMMBitmap(img.image, img.width, img.height, img.byteWidth, img.bitsPerPixel, img.bytesPerPixel);

if (saveMMBitmapToFile(bitmap, path, type) != 0) {
return Nan::ThrowError("Could not save image to file.");
}

destroyMMBitmap(bitmap);

info.GetReturnValue().Set(Nan::New(1));

}

NAN_MODULE_INIT(InitAll)
{
Nan::Set(target, Nan::New("dragMouse").ToLocalChecked(),
Expand Down

0 comments on commit f58e519

Please sign in to comment.