Category Archives: Projects

Script to Convert PSD Files to HTML Templates

For a while now I’ve been tinkering with this GIMP Plugin that converts PSD files to HTML templates. There’s been some recent interest in it, so I’ve decided to work on it some more and get a usable release out.

Download psd2html-gimp-plug-in

How do I install/use it?
The project page will have current installation and usage instructions.

What does it do?
The script detects which layers are on top of other layers and what their size and relative positions to each other are. This data is used to arrange the layers into a hierarchy, which can then be expressed as HTML nodes. Each layer is expressed as a <div> element with a unique id based on the layer name, and that id is used to specify the size and position of that element using CSS. Text layers are saved as text within the HTML file, and image layers are extracted to the <template_name>_files/ directory, relative to your PSD file.

Can you port this to Adobe Photoshop?
I think it would be possible to write a similar plugin for Photoshop, but for a large variety of reasons it’s not very practical. Reasons include: GIMP is FOSS and Photoshop is proprietary; GIMP plugins can be written in Python and I think Photoshop plugins have to be in written in C, C++, or Flash/Flex; based on what I’ve read on Adobe’s website I’d need to get their permission; and I don’t have Photoshop. Plus, Photoshop and the development tools I’d need only run on Mac and Windows, and I switched to Ubuntu almost 2 years ago.
I know lots of people prefer Photoshop and hate GIMP. If so you can always do your work in Photoshop and just use GIMP for PSD conversion.

Web Dev Bash Utils

I’ve just open sourced these bash scripts I wrote for web development. They’re available on GitHub.

Unfortunately they were written for use on a strict Unix environment with an outdated version of bash and without the benefit of GNU extensions (I was not the administrator), so they don’t currently work on Linux. My next step is to port them to Linux, and any help would be appreciated.

Update: I’ve seen some recent traffic to this post, and I wanted to let everyone know that this project has been taken down from GitHub. I didn’t have the time to port it to the GNU/Linux version of Bash, I didn’t really need the scripts anymore (if I did I’d rewrite them in Python, maybe using Fabric), and no one seemed interested in them, so I thought it would be better to take it down than leave a substandard, mostly unusable project on my GitHub profile.

Color Management 0.5 Add-on Released

Sorry for the long delay everyone, I’ve been really busy at my new job. In about a month I plan on changing my website from a personal blog to an open source community, so hopefully I’ll get some volunteers to help out with development.

I’ve been having some problems with the Firefox Add-ons Site, so for now this will only be available here. Some new features are:

  • Changed target application to XUL 1.9.1, so it should work with any XUL 1.9.1 based app, including:
    • Firefox 3.5
    • Thunderbird 3
    • SeaMonkey 2.0
  • Updated for new options in XUL 1.9.1
  • Choose profile dialog now defaults to OS specific color profile folder on Windows, Mac, and Linux.

Color Management 0.5 Add-on

Planned Upcoming Features for Color Management

Here’s some planned features for future releases of my Color Management extension:

  • Prompt to restart after changing options
  • File selector defaults to OS specific color profile directory
  • Add filter to file selector for color profiles
  • Ability to extract color profiles from images on a webpage and save to local color profile directory

Also, if I’m not mistaken color management in Firefox 3 is only for images with embedded color profiles; if a color profile is referenced but not embedded in an image it’s not used. It would be nice to eventually allow referenced color profiles to be used, and maybe add a download feature for referenced color profiles that aren’t present on the user’s local machine.

If you have any other suggestions please comment below.

Color Management 0.4

Here’s a quick release for my Color Management extension that fixes a bug with the file selector on Linux. I’ll be updating it again later today or tomorrow, but I wanted to get this released so that I can get my extension out of the Firefox add-ons Sandbox before the release of Firefox 3 Final tomorrow. Thanks to Tim Rowley for finding the bug. He’s also the guy who wrote the color management feature for Firefox 3.

Download Color Management 0.4

Color Management 0.3

Here’s the next version of my Color Management extension. This is just a compatibility update, supporting Firefox 3 RC1. In the next week I plan on releasing another version with some feature enhancements.

I’ve been having trouble uploading the new version to the Firefox Add-ons Site (the connection keeps timing out), so for now it’ll only be available here.

Download Color Management 0.3

Color Management Extension Released

Well, fixing the bugs in my Color Management extension went a lot faster than I though, and in 3 short days I had a usable release. Last night I posted my extension to the Firefox Add-ons site and the Songbird Add-ons site. It’s nice to see that in the 10 hours since I first posted it, my extension has been downloaded 7 times from the Songbird site.

I was able to add in the file browser fairly quickly, which is something I wasn’t planning on doing until after the first release. It’s a really simple extension, so all that’s left to do is add more localizations and fix bugs if there are any. If anyone finds any bugs or has a localization to add, just post below and I’ll add it in. The only other thing I can think of is linking to the ICC test page and/or putting the test image right in the extension.

Download the Color Management extension (Firefox 3.0b4, Songbird 0.5)

color-management-preview-songbird.jpgcolor-management-preview-firefox.jpg

Below are links to information on Color Management that I found useful:

Firefox 3: color managed web browser coming near to you
FireFox 3 – Color Management Done Right
Gfx.color_management.display_profile
Safari ushers in better browser colors