I capturing an Image from a camera (that works) and like to process it so I am calling grabPixels(). The code looks as follows:
else System.out.println("Pixel grab not successful");
System.out.println("PixGrabber interrupted by other thread");
I always get the "Pixel grab not successful" .... I did some more inspecting and found that while pgObj.grabPixels() returns true, ((pgObj.getStatus() & ImageObserver.ALLBITS)!= 0) returns false. I replaced ImageObserver.ALLBITS with ImageObserver.ERROR, ABORT and PROPERTIES and it is still false.
However, when I use ImageObserver.FRAMEBITS, HEIGHT,SOMEBITS,WIDTH it returns true but the image i get is extremelly misformed...
Can anyone tell me what the cause of thsi could be?
I have searched all over and it feels i have echausted the www!
I'm not exactly sure the context of this, but this updateImage can be called when the entire image isn't know, but only new parts of the image are loaded. So, not getting ALLBITS is not necessarily an error, it just means that there might be more to go. I'm not sure if this helps, but hopefully it will.
If you can post more information someone might be able to help further.
Thank you Elvich! knowing that makes debugging easier.
can you plz tell me how to get RGB values through JAVA
From a BufferedImage (http://java.sun.com/j2se/1.4.2/docs/...eredImage.html) you can do a getData() which will specify the data based on the color model. See the "Field Summary" above for the specifications of the color models.
Hope this helps.
By SAnderson in forum Java
Last Post: 09-07-2005, 02:12 PM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL