I would like to know what is the fastest way to go through every pixel in an image (something like C# unsafe mode perhaps) and do some action i.e. change rgb?

Next thing I am curious about is the jar executable. When I launch my app via jar, it is considerably slower than in netbeans IDE, how is that possible?
Thank you for responding