R
Riri
Hello, i have an image, and i'd like to obtain a table in which i store RGB
values of each pixel, and then create an another image from a
MemoryImageSource using that table. I don't know how to manage it, any idea?
Thanks
Melina
Image image2 = getToolkit().getImage("D:/Temp/b.jpg");
//Création du tableau pixel image et affichage
int w = 256;
int h = 256;
int pix[] = new int[w*h];
int index = 0;
for (int y = 0; y < h*w; y++) {
pix[index++] = ???
}
Image image = createImage(new MemoryImageSource(w, h, pix, 0, w));
values of each pixel, and then create an another image from a
MemoryImageSource using that table. I don't know how to manage it, any idea?
Thanks
Melina
Image image2 = getToolkit().getImage("D:/Temp/b.jpg");
//Création du tableau pixel image et affichage
int w = 256;
int h = 256;
int pix[] = new int[w*h];
int index = 0;
for (int y = 0; y < h*w; y++) {
pix[index++] = ???
}
Image image = createImage(new MemoryImageSource(w, h, pix, 0, w));