Complete the lua2bmp kernel