i coding these line ...
it is working fine....
but what i need is compress that Bufferedimage before getting it as Raster
i tried jpeg compreesion but it return bytestream instead of int..
so i got exception "can't cast BufferdByte as BufferedInt"...
Bufferedimage image=robot.createScreenCapture(new Rectangle(width, height));
////here i need compression for above bufferdimage/////////////////
Raster ras = ((BufferedImage) image).getData();
any help.....:?: