Show HN: Image to CRT
victorribeiro.com
victorribeiro.com
ff-tensor <(echo ff0000ff 00ff00ff 0000ffff | ff-scanf 3 1 '%2x%2x%2x%2x' + | ff-enlarge 1 2)
(It also works if you write ff-enlarge outside of the parentheses instead, since it is also effectively a kind of tensor product, too, so it is associative)If you make the tensor product in the reverse order (exchanging the two operands of the input pictures), then it will make the separations with the entire red picture on the left, the entire green picture in the middle, and the entire blue picture on the right, instead.
I do intend to this using an array conversion and fiddle with the new pixel format also. but this command you posted seems very clever. I wonder what do I have to install to try it on my machine.
http://zzo38computer.org/prog/farbfeld.zip or use the fossil repository http://zzo38computer.org/fossil/farbfeld.ui
Compile the programs that you want; in this case, ff-tensor, ff-enlarge, and ff-scanf.
And then you will need the conversions; for example, ff-xcapture captures X window screen, ff-xwin displays the picture on the screen, pngff decodes PNG, and ffpng encodes PNG. (If you prefer, you can also use any other farbfeld programs (including the original implementation from suckless); the latest version of ImageMagick also supports farbfeld, so you can also use that to convert the pictures.)
(You can ignore all of the files that you do not need (you do not need to compile all of them; in fact you can delete the files that you do not need); only a few of them have dependencies such as pngff and ffpng depend on LodePNG (which is included), and ff-xwin depends on X window system.)
to use just select a picture from the file input.
since each real pixel gets translated to 3 pixels wide and 2 tall, I've added a slider where you can resize the original image before converting it, just drag the slider to the left.
if you do use this on your phone I recommend moving the slider all the way to the left before choosing a picture (10% of the original size of the image)
hope you like it