parent
0f1b923cc9
commit
98bff887f5
@ -40,7 +40,7 @@ namespace images {
|
|||||||
//% blockId=device_build_image block="create image"
|
//% blockId=device_build_image block="create image"
|
||||||
//% parts="ledmatrix"
|
//% parts="ledmatrix"
|
||||||
Image createImage(ImageLiteral_ leds) {
|
Image createImage(ImageLiteral_ leds) {
|
||||||
return new RefMImage(imageBytes(leds));
|
return NEW_GC(RefMImage, imageBytes(leds));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -145,7 +145,7 @@ namespace led {
|
|||||||
//% parts="ledmatrix"
|
//% parts="ledmatrix"
|
||||||
Image screenshot() {
|
Image screenshot() {
|
||||||
auto d = uBit.display.screenShot().leakData();
|
auto d = uBit.display.screenShot().leakData();
|
||||||
auto r = new RefMImage(d);
|
auto r = NEW_GC(RefMImage, d);
|
||||||
d->decr();
|
d->decr();
|
||||||
return r;
|
return r;
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user