Skip navigation


This is rather old stuff, I was looking for an easy way to create html templates in an easy but open source kind of way. It is a perl-fu plugin for Gimp which allows you to draw your template as a multi-layered image, then automatically export it to html + individual png files. It was originally written for Gimp v.1, but it seems to work fine with Gimp v.2
# AUTHOR: Michael K. Nacos
# DESCRIPTION: perl-fu plugin for gimp which converts a multi-layered
# image to an html template + corresponding png images
# DEPENDENCIES: you need gimp, perl (doh!) and the Gimp::Perl module
# INSTALL: satisfy the above, then place script in ~/.gimp plug-ins dir
# USAGE: start by creating a new image (e.g. 1024x76 8) and adding all
# individual decorative elements in individual transparent gimp layers
# each layer will be converted to a separate png file with the same
# name as the gimp layer, size cropped to a minimum
# an appropriate html file with individual div blocks and css positioning
# will be automatically created
# KNOWN BUGS: you have to save at least once the layered file (.xcf)
# before application of this script. images are deposited in the dir
# you select but html file is deposited in the directory gimp runs in
# (this is not a problem if you cd to the directory you want before running
# gimp from the command line. in gimp 2 you may not undo the flatten
# operation after this script completes.
# DISCLAIMER: this is an old file. it works for me! please don’t flame.

Please make sure you understand the above.

Click here to download.



  1. hi,
    i started a more feature rich rewrite in python called CSSdev. The first version is available now:

  2. Hi Bart
    I am not actively maintaining gimp2css, it’s just a utility script I have used in real projects and it works for me. There’s plenty of room for improvements/new implementations. Good luck with CSSdev!


  3. instructions as to where to find the button to start the export operation? or is it a secret?

  4. You might be lacking Gimp-Perl on your system. Entries are difficult to miss in the main menu if it loads properly 😉

    The official home of Gimp-Perl seems to be:

    There are many ways to install perl’s Gimp module in Linux, from using tools such as apt/yum/yast to building from source.

    e.g. in Ubuntu you may type: sudo apt-get install libgimp-perl

    Although Gimp has been successfully ported to Windows a long time ago, I am not aware of a win32 port of its perl module.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: