Apply a palette to index data to create a 2D image.
apply.palette.to.rawdata(raw_data, apply_palette, img_width, img_height)
integer vector of pixel data, each entry represents an index into the palette.
integer matrix, the palette.
integer, the width of the image to create.
integer, the height of the image to create.