Author Topic: Fast access to pixel data?  (Read 3211 times)

Linuxhippy

  • Guest
Fast access to pixel data?
« on: March 08, 2005, 08:49:17 am »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Fast access to pixel data?
« Reply #1 on: March 08, 2005, 05:01:31 pm »
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

  • Guest
Well..
« Reply #2 on: March 16, 2005, 08:40:28 am »
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