Thanks, I've done that and am getting much better performance
than previously.
ba = ((DataBufferByte)(bi.getRaster().getDataBuffer())).getData();
pixels = new int[width*height];
for(int i = 0,j = 0; i < pixels.length; i++,j+=3)
{
pixels[i] = 0xff000000 | (((ba[j+2] & 0x000000ff) << 16) | ((ba[j+1] &
0x000000ff) << 8) | (ba[j] & 0x000000ff));
}
Now I'm exploring
ri = reader.readAsRenderedImage(0, param);
But this stuff is really dense and convoluted. It would probably
make more sense to me if I took a hit of LSD but...
[EMAIL PROTECTED] wrote:
But this whole experiment still leads me back to ask
for a way to
decode an image directly into an integer array like I
first asked.
Something like pixels =
imageReader.decodeFileBytesToIntegerArray(...)
But all I seem to get from you is "...rewrite the
applet..." Ok.
Ken, don't rewrite applet, just add conversion (just a few lines of code) from
byte array(s) to int array.
This is really an inexpensive operation.
Andrey
[Message sent by forum member 'imagero' (imagero)]
http://forums.java.net/jive/thread.jspa?messageID=275567
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".