[core] For binary image data use uint8_t, not char

This commit is contained in:
John Firebaugh
2015-11-23 13:37:00 -08:00
parent a620912176
commit 36081f6486
13 changed files with 31 additions and 34 deletions

View File

@@ -360,8 +360,7 @@ void NodeMap::renderFinished() {
cb->Call(1, argv);
} else if (img) {
v8::Local<v8::Object> pixels = Nan::NewBuffer(
reinterpret_cast<char *>(img->pixels.get()),
size_t(img->width) * size_t(img->height) * sizeof(mbgl::StillImage::Pixel),
reinterpret_cast<char *>(img->pixels.get()), img->width * img->height * 4,
// Retain the StillImage object until the buffer is deleted.
[](char *, void *hint) {