| ▲ | kristianp 2 hours ago | |
Here's the code from the bsky message using chatgpt to extract it from the image. It is apparently a K program that reads an image and renders it as ascii. I haven't checked for errors as I'm on my phone. round=:<. @: (+&0.5) (gr=:{[ round +/0.21 0.72 0.07y ]})[grPxl=:{({x,y},3$gr}.y)}] (sla=:34 b.) [ (and=:(16 + 2b0001) b.)[byte=:{[ 16bff and y ]}] (splitrgb=:{[ byte 24 16 8 0 sla y ]})[joinrgb=:{ +/ 24 16 8 0 sla y } }] img=:(load 'graphics/png')readpng 'she.png' height=:>.width%$img[width=:100 ratio=:( $img)%height,width nn=:{ round x * y }} idx=:ratio(nn'1)(width,width)#:.i.height,width alph=:'$@B%8&W#oahkbdpqwmZ00QLCJUYXZcvunxrjft/\|()1{}[]?-_+~<>i!lI;:,^`". ' chr=:{ (>.(($alph)-1)*y%255){alph}} ascImg=:'',2 chr"0 gr'll ';' splitrgb"0 (<idx) { img (puts=:{ y 1!:2 (4) })[puts , ascImg ,. LF | ||