Re: How to convert GUI component's graphics to int[]or byte[]?



Andrew Thompson wrote:

I've tried doing this by having the component paint() its graphics on a java.awt.image.BufferedImage and then using a java.awt.image.PixelGrabber' s getPixels() to extract the array.

I was first thinking along those lines, but I Googled the group and noticed the answers for getting an image of a Java (or any) component, kept being 'Robot.createScreenCapture()'.

Hmm. Guess I should be taking a closer look at that, then. Thanks for the pointer. :)


--
-Aki "Sus" Laukkanen
.



Relevant Pages

  • Re: How to convert GUI components graphics to int[]or byte[]?
    ... graphics converted into an array of ints? ... java.awt.image.BufferedImage and then using a java.awt.image.PixelGrabber' s getPixels() to extract the array. ...
    (comp.lang.java.gui)
  • Re: Suggestions for reading binary data from a connected socket.
    ... >> I could read the entire message into a java Byte ... >> is there any way to convert parts of byte array into long, short, ... or the stream fto build and extract? ...
    (comp.lang.java.programmer)
  • C++ equivlence of int[][] x.length
    ... In java, you can extract the height and width of an array. ... int height = img.length; ...
    (microsoft.public.vc.language)
  • Re: Java Generic programming using subclassing
    ... Java nowhere guarantees that the elements of an array ... Now chances are that any Java ... > reference will be visible through the other. ... > eligible for garbage collection, and will in fact be collected before ...
    (comp.lang.java.programmer)
  • Re: java based supercomputer
    ... checking the correlation beteween an array of data and another array ... java psuedo remote threads will take a considerrably less time. ... Does your algorithm lend itself well to paralellization? ... the only bottleneck i can see is checking the correlation value ...
    (comp.lang.java.programmer)