I want to read this png in binary format.
I have been reading all over the net, and this looks like the correct way of doing it with angular.
But it just does not work. Any idea why?
$http({
url: 'somepng.png',
method: 'GET',
data: '',
responseType: 'arraybuffer'
}).success(function(resp, config1, config2, config3) {
console.log(typeof resp); // this is a string, weird! in Chrome
console.log(resp);
});
The arrray buffer returns a string instead of an array o of bytes.