you can use Blitbuffer.new(w, h, w, data, 32, true) and that's it :-)