Merge "Open image files in binary mode" am: 744677aaf5
am: 70c0861e22

Change-Id: I9dd733b712fe8b717e2008c7e21881e9933e5ffb