rotate180 method
Implementation
UGrayImage rotate180() {
final Uint8List out = Uint8List(width * height);
for (int y = 0; y < height; y++) {
final int src = y * stride;
final int dst = (height - 1 - y) * width;
for (int x = 0; x < width; x++) {
out[dst + (width - 1 - x)] = data[src + x];
}
}
return UGrayImage(out, width, height, left: left, top: top, sourceWidth: sourceWidth, sourceHeight: sourceHeight);
}