Sometimes you just want to turn a photograph into a 3D printed shape so you can share it with a friend:

original image

Cropping this leaves a nice greyscale image. cropped image

We can think of the lighter areas as being high and the darker areas as being low. dem2stl is a script originally intended to take topographical map images and turn them into 3D shapes based on RGB values but it works very well for black and white images: original image

The script processes the image pixel-by-pixel to convert the image into the top face of a 3D solid, while also stitching the base faces to make a solid according to the STL file format.

Cleaning up the input image would have produced a cleaner solid but the roughness adds a bit of character.

If you have your own 3D printer, you can grab the STL file and print your own