It should work. I suspect there is a bug somewhere in your code. But
without seeing your code it impossible to know exactly where.
I don't have big code (just a few lines).
But, if I have a photo 100x200 pixels, and I would like to read just first
40x50 pixels, what should be syntax for PixelGrabber?
>> I'm trying to access a pixels from a part of an image, but it seems not
>> working.
> It should work. I suspect there is a bug somewhere in your code. But
> without seeing your code it impossible to know exactly where.
>> How could I access a pixels from only a part of an image?
Thomas Fritsch - 19 Aug 2007 20:03 GMT
> I don't have big code (just a few lines).
Where? I don't see anything.
> But, if I have a photo 100x200 pixels, and I would like to read just first
> 40x50 pixels, what should be syntax for PixelGrabber?
Carefully read the API docs at
<http://java.sun.com/j2se/1.4.2/docs/api/java/awt/image/PixelGrabber.html>
There is an example how to get all the pixels of an image. You have to
modify it for getting only the top-left 40x50 pixels of the image.

Signature
Thomas