Stewart Thomas on 18 Oct 2021
% If you are looking for a sneaky JPEG-to-MiniHack one to remix, this is the one :)
n=@(x)read(py.os.popen(x)); % interface to running linux command
l="https://i.imgur.com/ADtYwBi.jpeg"; % The url of a JPEG you want to display
n(join(['wget ',l,' -O b'])); % execute command
g=uint8(str2num(char(n('djpeg b | od -An -w1 -tu1 -v')))); % convert to vector of integers
% disp(n('djpeg b | head -n2 | tail -n1')); % Uncomment to display the
% resolution for the image
%m=368; % the resolution for this image
% Now, convert to RGB image. You may need to adjust the "15".
% It is a character offset, based on the digits of the resolution numers.
% 15 is for a 3x3 (i.e., "800 by 600" -- 6 characters in resolution
% 17 is for a 4x4 (i.e. "1920 by 1024" -- 8 characters in resolution
% and so on
% This may be against the spirit of the challenge though. Until then,
% however, hack on :)