Why I like open source

28/09/2008

I’ve been mucking about with Python of late, well more Django, and one of the ways I’ve been trying to learn it is by writing small scripts to do something ‘real’. Since one of the things I like doing is graphic work my python ‘apps’ are centered around doing something of use to do with that.

The first python app I wrote let me click on points in a photo to build up an RGB gradient. Writing this for GIMP was ridiulously easy since I could just have a look at the source code that handles gradient files. These GGR files are very simple consisting of just a plain text header & some (decimal) color codes. Photoshop on the other hand uses an undocumented binary file. So my script outputs GIMP compatible gradients.

Fast forward to last night and I was browsing my bookmarks and clicked through to ColorSchemer.com. Its a cool website with user submitted color schemes. Theres a couple of generated graphics on the site for each palette and the option to download the .cs file for it. This file is, like photoshop assets, in binary form but looking at it in a hex editor it’s quite obvious where the interesting bits are. It took maybe 15minutes to write a quick python script to convert these into GIMP compatible palette files.

This is one of the reasons why I like open source, information is transparent. I just opened an existing GIMP palette file into a text editor and there was the information I needed to create new files. And I didn’t have to jump through hoops or employ some sort of encryption. Nice and easy :D

No Comments