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.....:?:

Edited by musthafa.aj: n/a

7 Years
Discussion Span
Last Post by masijade

What is wrong with this thread?

What is this int[] that you want? If it is the RGB values for the entire image, then simply use the getRGB method I posted in your other thread and don't worry about creating a "Raster" object at all. If it the RGB values for a single pixel row of the image, you can still use that method I posted in your other thread, you just need to slightly change the arguments.

Edit: And I am locking this thread now, continue in your other thread.

Edited by masijade: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.