diff --git a/lib/Dither.dart b/lib/Dither.dart index 7cc3f6c..839fe79 100644 --- a/lib/Dither.dart +++ b/lib/Dither.dart @@ -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);