Image file to bin array