-Change image buffer to a 2D array
-update fill image buffer function for 2D array