Complete the bmp2lua kernel