I am doing a discrete choice experiment design for a project that we are just starting. The idea is to present screenshots of various app’s in an app store and ask the participants to pick one. For this, we need screenshots of app’s with key variables changed. The problem is that, unless you are careful you may make mistakes in creating manipulations. Especially if there are more than a handful conditions. For this, I used GIMP and xcftools package to programmatically create the treatments.

First I used GIMP to create a template. Each manipulation condition had a layer assigned to it (as seen in the figure). It can get quite involved depending on number of variables you wish to manipulate.

Much like photoshop, the layers can be set visible or invisible. I don’t know about photoshop, but in GIMP you can also do this through scripts or commandline tools.

After some deliberation, I decided to use xcf2png from xcftools package.

Basic usage is to as follows:

xcf2png Template.xcf LayerName1 LayerName2 ... > output.png

Here are some simple examples generated this way. In real usage, it may be wise to pixelate the app name and icon to prevent brand effects.

Automating the rest through a bash script is pretty easy!