Skip to content

Commit

Permalink
More accurate types.
Browse files Browse the repository at this point in the history
  • Loading branch information
octalmage committed Oct 6, 2015
1 parent ea719a2 commit e28cb2a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/robotjs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -644,11 +644,11 @@ NAN_METHOD(getColor)
//Get our image object from JavaScript.
Local<Object> obj = Nan::To<v8::Object>(info[0]).ToLocalChecked();

unsigned int width = obj->Get(Nan::New("width").ToLocalChecked())->Uint32Value();
unsigned int height = obj->Get(Nan::New("height").ToLocalChecked())->Uint32Value();
unsigned int byteWidth = obj->Get(Nan::New("byteWidth").ToLocalChecked())->Uint32Value();
unsigned int bitsPerPixel = obj->Get(Nan::New("bitsPerPixel").ToLocalChecked())->Uint32Value();
unsigned int bytesPerPixel = obj->Get(Nan::New("bytesPerPixel").ToLocalChecked())->Uint32Value();
size_t width = obj->Get(Nan::New("width").ToLocalChecked())->Uint32Value();
size_t height = obj->Get(Nan::New("height").ToLocalChecked())->Uint32Value();
size_t byteWidth = obj->Get(Nan::New("byteWidth").ToLocalChecked())->Uint32Value();
uint8_t bitsPerPixel = obj->Get(Nan::New("bitsPerPixel").ToLocalChecked())->Uint32Value();
uint8_t bytesPerPixel = obj->Get(Nan::New("bytesPerPixel").ToLocalChecked())->Uint32Value();

char* buf = node::Buffer::Data(obj->Get(Nan::New("image").ToLocalChecked()));

Expand Down

0 comments on commit e28cb2a

Please sign in to comment.