- 1
Convert this java code to c# code
BufferedImage imgA = ImageIO.read(new File("C:/img/picA.jpg")); BufferedImage imgB = ImageIO.read(new File("C:/img/picB.jpg")); boolean bufferedImagesEqual(BufferedImage img1, BufferedImage img2) { if (img1.getWidth() == img2.getWidth() && img1.getHeight() == img2.getHeight()) { for (int x = 0; x < img1.getWidth(); x++) { for (int y = 0; y < img1.getHeight(); y++) { if (img1.getRGB(x, y) != img2.getRGB(x, y)) return false; } } } else { return false; } return true; }
1 Answer
0
You have to read into C# a little, I don' think it would be a good idea to just give it to you. Search the internet how to read an image file in c#, and how to get it's attributes such as height and width,how to declare a Function.