framebuffer not work
my code, follow.... when use png format, file is empty. when use raw format, file has invalid data.
client.framebuffer(device.id, "png", function(err, info, fb_data) {
if(err) {
console.log("screencapture failed @", device.id, ":", err);
return;
}
console.log(info);
var pngname = device.id+"-"+index+'.png';
index += 1;
var stream = fs.createWriteStream(pngname);
fb_data.pipe(stream);
});
Do you have GraphicsMagick installed? If you're not getting any errors, that's probably the reason. If you are getting an error, could you post it here?
GraphicsMagick is installed. no error information.
when GraphicsMagick not install, program throw exception..
Sorry my English sucks
I write a simple program for test. Where I was wrong??
var adb = require('adbkit'); var fs = require('fs'); var client = adb.createClient();
var index = 0;
client.listDevices(function(err, devices) { devices.forEach(function(device) { client.framebuffer(device.id, "png", function(err, info, fb_data) { if(err) { console.log("screencapture failed @", device.id, ":", err); return; } console.log(info); var pngname = device.id+"-"+index+'.png'; index += 1; var stream = fs.createWriteStream(pngname); fb_data.pipe(stream); }); }); });
Could you tell me the output of the following commands:
adb version
adb shell getprop ro.product.model
gm -version
And the output from console.log(info) if possible.
By the way 日本語でもOK, if you're Japanese :)
D:\Android\adt-bundle-windows\sdk\platform-tools>adb version Android Debug Bridge version 1.0.31
D:\Android\adt-bundle-windows\sdk\platform-tools>adb shell getprop ro.product.mo del SM-N9008
D:\Android\adt-bundle-windows\sdk\platform-tools>gm -version GraphicsMagick 1.3.19 2013-12-31 Q16 http://www.GraphicsMagick.org/ Copyright (C) 2002-2013 GraphicsMagick Group. Additional copyrights and licenses apply to this software. See http://www.GraphicsMagick.org/www/Copyright.html for details.
Feature Support: Thread Safe yes Large Files (> 32 bit) yes Large Memory (> 32 bit) yes BZIP yes DPS no FlashPix no FreeType yes Ghostscript (Library) no JBIG yes JPEG-2000 yes JPEG yes Little CMS yes Loadable Modules yes OpenMP yes (200203) PNG yes TIFF yes TRIO no UMEM no WMF yes X11 no XML yes ZLIB yes
Windows Build Parameters:
MSVC Version: 1500
framebuffer info { version: 1, bpp: 32, size: 8294400, width: 1080, height: 1920, red_offset: 0, red_length: 8, blue_offset: 16, blue_length: 8, green_offset: 8, green_length: 8, alpha_offset: 24, alpha_length: 8, format: 'rgba' }
any update on this? i am having the same issue
Any update on this??? Someone solve this issue? i need some help