PixelArray from ImageData constructor

This commit is contained in:
Unknown 2018-02-14 15:27:33 +01:00
parent d6503bb613
commit fb7776feac
1 changed files with 2 additions and 0 deletions

View File

@ -49,6 +49,8 @@ class PixelArray {
}
}
PixelArray.fromImageData(ImageData imagedata, int imageWidth): this.fromByteArray(imagedata.data, imageWidth);
Uint8ClampedList toByteArray() {
//TODO: look for longest array, or each line separately. Only gets width from line 1 currently.
Uint8ClampedList result = new Uint8ClampedList(getHeight()*getWidth()*4);