I am working on part of a Java application that takes an image as a byte array, reads it into a java.awt.image.BufferedImage instance and passes it to a third-p
java.awt.image.BufferedImage
I can't think of anything besides a brute force "do loop":
BufferedImage bi1, bi2, ... ... Raster r1 = bi1.getData(); DataBuffer db1 = r1.getDataBuffer(); if (db1.getSize() != db2.getSize ()) ... for (int i = 0; i < db1.getSize(); i++) { int px = db1.getElem(i); }