PixelArray from ImageData constructor
This commit is contained in:
parent
d6503bb613
commit
fb7776feac
1 changed files with 2 additions and 0 deletions
|
@ -49,6 +49,8 @@ class PixelArray {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PixelArray.fromImageData(ImageData imagedata, int imageWidth): this.fromByteArray(imagedata.data, imageWidth);
|
||||||
|
|
||||||
Uint8ClampedList toByteArray() {
|
Uint8ClampedList toByteArray() {
|
||||||
//TODO: look for longest array, or each line separately. Only gets width from line 1 currently.
|
//TODO: look for longest array, or each line separately. Only gets width from line 1 currently.
|
||||||
Uint8ClampedList result = new Uint8ClampedList(getHeight()*getWidth()*4);
|
Uint8ClampedList result = new Uint8ClampedList(getHeight()*getWidth()*4);
|
||||||
|
|
Loading…
Reference in a new issue