Hi, long time no see.I've been really busy with my software 3D engine and it is turning out to be a nice system

I have one question about Images though... Is there any other way to fetch the pixels from an Image than with a PixelGrabber? First, it's slow and secondly if a game has a high framerate and getPixels() is called like 60 times/second the program will eventually crash as it cannot fetch the pixels fast enough. The implementation doesn't allow the pixels to be cached as a new image can be supplied at any time asynchronously, so this is the only way. Right now I've solved it by forcing the user to fetch the pixels by himself and give the pixel array as an argument to my method, but it feels somewhat of a hack. Any ideas?

How about reading the pixels data from a file to an array (maybe using your own format) and using java.awt.image.MemoryImageSource to create a java.awt.Image? You can have immedeate access to the pixel array aswell as to the image.

How about reading the pixels data from a file to an array (maybe using your own format) and using java.awt.image.MemoryImageSource to create a java.awt.Image? You can have immedeate access to the pixel array aswell as to the image.

Hi.That's what I am doing now, but I want to have a method, drawImage(Image, width, height etc...) in my own rasteriser. I try to keep a high abstraction level so the user won't have to fetch the image pixels himself and calling the current drawImage(int[] pixels, width, height etc...). Hope you understand what I mean.Laters.

Hi.That's what I am doing now, but I want to have a method, drawImage(Image, width, height etc...) in my own rasteriser. I try to keep a high abstraction level so the user won't have to fetch the image pixels himself and calling the current drawImage(int[] pixels, width, height etc...). Hope you understand what I mean.Laters.

Then the answer is no.

I suggest you create a wrapper for the int [] way of doing it, and then simply provide a drawImage(YourImageClass,x,y,etc)

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org