How to load raw binary array data into Julia and display it?

Viewed 209
1 Answers

Here is the code and along with the resulting plot:

using Plots, Images, HTTP
r = HTTP.request("GET", "http://eeweb.poly.edu/%7Eyao/EL5123/image/lena_gray.raw")
img = reshape(r.body, 512, 512)
v = rotr90(colorview(Gray, img./256));
Plots.plot(v)
savefig("lena.png")

enter image description here

Related