How come they don't compare?
New to both the group and Image Processing. Here is sniplet of code showing that 2 images that "must" be identical, do NOT compare:
File file_1, file_2;
BufferedImage img_1, img_2;
// Read the PNG file
file_1 = new File( "File1.png");
img_1 = (BufferedImage)ImageIO.read( file_1);
// Write back to another file the SAME PNG file
file_2 = new File("File2.png");
ImageIO.write(img_1, "png", file_2);
// READ back to another file the PNG file we JUST wrote
img_2 = (BufferedImage)ImageIO.read( file_2);
// Compare() returns a matching factor - DO NOT MACTH
"Matching Factor = " + compareImage( img_1,img_2 ) );
I gues I am missing something .... am I?
Thanx in advance: