File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Modifying BufferedImage pixels Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Modifying BufferedImage pixels" Watch "Modifying BufferedImage pixels" New topic

Modifying BufferedImage pixels

Jon Mattson

Joined: Feb 07, 2006
Posts: 19
I'd like to know what's the fastest way to move a column of pixels one pixel down so that the lowest pixel comes out on top. I'm now talking about 16x16 tiles for my game. It should be fast enough so that you can do it every frame keeping 60 fps. Is this possible and how?
Subhajit Mitra

Joined: Jun 06, 2006
Posts: 21
wrong forum, i guess
Jon Mattson

Joined: Feb 07, 2006
Posts: 19
So what's the right forum?

I found an example somewhere where pixelgrabber was used to get a 1D array of the pixels from an image. Then the 1D array was converted to a 3D array which contained the red, green, blue and alpha value for each pixel.

I got a couple of questions about this:

First I think the page was pretty old and there might be something else I can use, is there?

Second if pixelgrabber is the best way then how does it really work the example I got worked well but when I tried to integrate it to my own code it didn't work.

I'm talking about this page

Replies appreciated
[ June 12, 2006: Message edited by: Jon Mattson ]
I agree. Here's the link:
subject: Modifying BufferedImage pixels
jQuery in Action, 3rd edition