Taken around 4:00 in the morning on January 4th, 2022, the view from my perspective, battling insomnia.
p5.js was used to manipulate the photo. The code is below.
Dimensions 3024x4032.
let img; let help = ".... . .-.. .--. "; let charmap = help.split(""); let charIdx = 0; let spacing = 12;
function preload(){ img = loadImage("insom.png"); }
function setup() { createCanvas(3024, 4032); background(0); img.loadPixels(); textAlign(CENTER); textSize(14); }
function draw() { image(img, 0, 0); for (let i=0; i<img.pixels.length; i += spacing*4){ let r = img.pixels[i]; let g = img.pixels[i+1]; let b = img.pixels[i+2]; let a = img.pixels[i+3];
let c = color(r, g, b, a);
let br = brightness(c);
let lc = color(10);
if (br > 18) lc = color(255, 0, 0);
fill(lc);
let pixel_num = floor(i/4);
let pixel_row = floor(pixel_num / img.width);
let pixel_col = pixel_num - (pixel_row*img.width);
text(charmap[charIdx], pixel_col, pixel_row);
charIdx += 1;
if (charIdx == charmap.length) charIdx = 0;
}
save("insomnia.png");
noLoop();
}