Hello all,

I want to be able to import a jpeg image, display the image on screen, manulipulate the pixel data in a raster, and redisplay the changed image. Here is how far I have gotten.

I have imported a jpeg image and create a BufferedImage of it

bi = new BufferedImage (img.getWidth(this), img.getHeight(this), 
BufferedImage.TYPE_BYTE_GRAY);
I can then examine the pixel data in this buffered using e.g the value at (0, 5)
bi.getRaster().setPixel(0, 5, pix1);
Also I can modify the data (at position (0,11)) in the buffer using
bi.getRaster().setPixel(0, 11, pix2);


However modifying the raster data appears to have no effect on the image I'm drawing. The two classes that I am importing are

import java.awt.image.*;
import java.awt.image.WritableRaster.*;
Any and all help would be greatly appriciated.

Eoin.
 

Reply via email to