Fast access to pixel data?

Started by Linuxhippy, March 08, 2005, 08:49:17 AM

Previous topic - Next topic

Linuxhippy

Hi there!

I know this forum is primiliary targeted at JPCT, but I have a question and hoped that here I could find an answer.

I have to access every single pixel of an java-toolkit-image, but pixelgrabber is way too slow for my taste, since grabbing a 500x500 image takes 10s on my p4 :-(

Any help is welcome, lg Clemens

EgonOlsen

10 seconds for a 500*500 image :?: That's way too much. I'm using a PixelGrabber to access the texture data after loading...and i'm loading a lot of 512*512 textures. Can you post some code?

Linuxhippy2

Thanks for your reply!

Well, I played a bit arround and came to the conclusion that this is a bug in java-1.4 and above.
They changed their internal rendering structures a lot and since BufferedImage is since 1.2 the way to go, they do not support it very well anymore.

I just added a dynamimical switching, where I use BufferedImage when running on 1.2+.
Maybe this helps someone if he runs into the same problems...

Thanks a lot for your help, lg Clemens