I have a picture and a rotated picture to compare.
if (this.img.getHeight() == img1.getWidth() && this.img.getWidth() == img1.getHeight()) {
for (int i = 0; i < this.img.getWidth(); i++) {
for (int j = 0; j < this.img.getHeight(); j++) {
assertEquals(this.img.getRGB(i, j), img1.getRGB(this.img.getWidth() - j, i));
}
}
}
This is the loop I use, but somehow it doesn't work.
The picture is rotated by 90° clockwise.
this.img
is the original picture, img1
is the rotated picture. Can someone please help me? Thanks in advance!