i wrote two codes to get image data. one from java and one from c++;
C++ code:
unsigned char *data1 = stbi_load("C:/Users/skss/Pictures/Untitled.png", &width1, &height1, &nrChannels1, 0);
And for java:
BufferedImage img=ImageIO.read(new File ("C:/Users/skss/Pictures/Untitled.png"));
Raster ras=img.getRaster();
double[] data=new double[img.getWidth()*img.getHeight()*3];
ras.getPixels(0,0,img.getWidth(),img.getHeight(),data);
but these two not producing same results
Aucun commentaire:
Enregistrer un commentaire