Open BioRyajenka opened 3 years ago
I believe you can do something like (untested):
val slice: BmpSlice
val sliceFlippedX: BmpSlice = BmpSlice(slice.bmpBase, RectangleInt(sice.bounds.right, sice.bounds.top, -sice.bounds.width, -sice.bounds.height))
Wonderful, thanks!
Nice. Glad it helped. Let me keep this issue open. Maybe we can provide a method like .flipX().flipY()
or xFlipped
yFlipped
doing exactly that 👍
Just for info: actually your suggestion didn't help. It seems like provided code just shifts bmp slice "window" left up on the bmp.
Hi, is there a way to flip BmpSlice?
I know I can extract it to bmp, then flip, and then get the slice:
But I afraid it will affect performance in a bad way (because a new bmp created each time; and too many bmps are bad for performance). So is there a better way?
Also, is my suggestion is true: "using less but larger BMPs are better for performance"?