Confirmed Working ArrayToImage Function