Turning photos into beautiful art with Javascript

(click image to toggle original)

Image source: Heimaey

I’ve been kicking this idea around in my head, and decided to implement it while learning how to canvas in HTML5:
simplification of an image by drawing a bunch of lines

  1. Choose a pixel.
  2. Within some range around it, find another pixel with a similar colour.
  3. Draw a semi-transparent line to it, filled with a gradient from one colour to the other.
  4. Repeat a lot.

This creates a bunch of blurring, but usually constrained within objects due to the colour threshold.


thin lines


very thin lines


reversed logic


Here’s the JSFiddle. It’s really slow.

Clipstack, or Why is it so tedious to swap two text fields?

ctrl-x, ctrl-x, ctrl-`, ctrl-`

It’s almost 2016 but the Windows clipboard still sucks, so I prototyped a program that watches the clipboard for new data, and adds it to an internal stack.
A different hotkey (ctrl-`) pops data from the top of the stack, and pastes it.

IN OTHER WORDS: Swapping two fields isn’t unbearably tedious anymore! Your clipboard can have many items in it that you can paste sequentially with the hotkey! Seems to work with any kind of data!

Download (early release) binary here!

To change the hotkey create a file called “hotkey.txt” in the same directory, and put one key (list of .NET Forms Keys here) on each line.

For example, to get Ctrl-`, the file should be:

Control
Oem3

The code is on github.