Creative Coding: Visual Experiments & Information Pipeline

an ongoing coding and research seminar

Exploring dithering: batch convert images (image magic)

Exploring dithering

This is a very quick script to batch generate images conversion via image magic. It's using an array and a loop to generate commands on cli, which exectued conver the headre.jpeg file; each iteration of the code also concatenate a bit of html (< img > and some container). Once the loop is over, the html string is saved into a text file. It was not practical to experiment with the command line and I needed to get an overview of the differences amongst the different files; I also needed to preview how the image would work with some basic css layering (hence the multiple containers).

Usage: php batch_convert.php if the only image file in the folder is the header.jpeg then it will create all the versions based on the dithering parameters in the array.

Inspired by, and the front-end details More: Based on


View the experiment
Git repository

Repository for this website (assemble, build, deploy):
Main website:
Author: Jerome Rigaud