Some gfx fixes and tests

All the tests have been validated on a real Nokia Asha 503
Found it: http://www.java2s.com/Code/Java/J2ME/ImmutableImageFromByteArray.htm