Here's an example of how this type of thing should be handled:
DirectGraphics (Nokia UI API)
Nokia provides a class, "DirectGraphics", which provides direct access to the device-specific display. You'll note a routine, "drawPixels", which has three variations supporting raw image buffers of byte, short and int types, which allows the developer to work with the native pixel format for maximum performance.