Code

I like to program and I do it often, which is definitely connected to my studies (two way influence). Here is a small collection of programs and scrips which I have programmed and published over time, so that others can use it. By clicking on the headlines you get to a more detailed page about the software.

Unless stated otherwise, all code is Open Source and published under the LGPL. Feel free to use and enjoy it. You can contact me about questions and suggestions. If someone wants to use the code for another interesting project, I would be glad about a short email.

Firefox Addons

One reason why Firefox is the best browser in the world are the many extensions (so called Addons) with which one can add additional functionalities to it. A large collection of available Addons can be found at addons.mozilla.org.

The Color Inspector 3D Window showing the Color Cube
The Color Inspector 3D Window showing the Color Cube

Color Inspector 3D

The Color Inspector 3D shows all colors of an image in a rotatable RGB-color cube. When the user right clicks on an image, the option "show Color Inspector with Image" is shown in the context menu. If the user selects this option a new window is opened which shows the color cube of the image.

The Addon can be downloaded via addons.mozilla.org.


Histogram window with generated histogram
Histogram window with generated histogram

Histogram Viewer

The Histogram Viewer generates the histogram of a selected image. When the user right clicks on an image, the option "Show Histogram of Image" is shown in the context menu. If the user selects this option a new window is opened which shows the histogram of the image.

The Addon can be downloaded via addons.mozilla.org.


Greasemonkey

Greasemonkey is an Add-on for Firefox, which allows the user to include scripts when loading a specific or any website in order to alter/improve the appearance or functionality of the website. There are many of those scripts which can be found on pages like userscripts.org.
Who also wants to write their own Greasemonkey scripts should read the book “Dive into Greasemonkey“, which can be downloaded for free or read online. It contains many small and well explained code examples, in particular for common patters.

Screenshot of the prefilled search window at bvg.de
Screenshot of the prefilled search window at bvg.de

BVG Prefill

This script prefills the search form of the local transit company of Berlin (BVG) by filling in a preselected station as start and destination. This is handy as one usually searches for connections from or to ones home station. By clicking on the prefilled name, it vanishes and the user can enter their desired travel station.

The script can be downloaded via userscripts.org.

Details on how to adjust the script can be found on the special BVG Prefill page.


Screenshot TYPOlight Character Counter

TYPOlight Character Counter

In the free Content Management System TYPOlight the user can enter descriptions for the current page and keyword meta data for the article in order to search engine optimize the page and the text. As search engines usually index only the first 150 to 300 characters for the description and usually only the first 800 characters for the keywords, it is useful to know how many characters one has already written. This script does just that and shows the current number below the text area.

The script can be downloaded via userscripts.org.


JAlbum

Here some Skins and Filters I made during my time with JAlbum.


Pinboard Skin

The Pinboard-Skin is a Skin, which I did during my first week at JAlbum. It is based on an idea I had in the first semester of my studies. It looks like a big cork pin-board where the pictures are on pieces of paper which are pinned on the board with needles.

It is not as optically perfect as I wanted it to be, but as I am not much of a graphic designer, it is good enough for me now.

The Pinboard-Skin can be downloaded via the Skin Repository of JAlbum.


CodeGenerator

The CodeGenerator easily generates code with the help of JAlbum, which can be copied and pasted into forums and blogs in order to show your JAlbum images and link them to your album. It shows thumbnail images which then link to the normally sized images. The user can decide whether they should link to the images directly or to the pages in which the images are embedded.

Even thought this is technically a skin (you have to install it in the skin folder), it is not a skin in the way people expect it to be. It is not suitable for publishing an album with it. Instead it is more like a tool that creates the code which shows thumbnails from your existing album and also links to the fully sized images of it. You can then copy that code and post it easily in a forum or blog.

The code can be generated as regular HTML code but also also BB-Code. BB-Code is a special code for formatting postings on forums which do not allow HTML input.

The CodeGenerator can be downloaded via the JAlbum Skin Repository.

More details on how to use the CodeGenerator can be found on the special Code-Generator page.

AdobeRGB to sRGB Converter

This is an album filter for JAlbum which converts images from the AdobeRGB color space in to the sRGB color space. This is important as JAlbum does not support the AdobeRGB color space and saves the images as if they were in sRGB since both profiles have the same annotation. This leads to a strong loss in saturation of the images. The AdobeRGB color space is often used by professional photographers as it can describe a bigger color spectrum compared to sRGB.  This is of an advantage for printing but unfortunately if is not suitable for web publishing as Safari is the only mainstream browser which supports AdobeRGB. All other browsers also show the images with less saturation.
When I was asked to take care of that problem, I started searching for an existing implementation in Java. This only led me back to the JAlbum forum where this problem was described originally as the first search result. So I stared to write this implementation myself and to my knowledge it is the first AdobeRGB to sRGB convert in Java. Unfortunately this filter is very slow which is a problem of the specific Java method used. Even with several caching mechanisms I was able to only partially solve this problem.

The entire filter package can be downloaded via the JAlbum Forum. A more detailed description of how to apply the filter can be found on the AdobeRGB-to-sRGB-Filter page.


TYPOlight

I already described the open source Content Management System TYPOlight. Here are some modules which I have published for it.

Notes

Notes is a TYPOlight Module with which the user can write small notes on their homepage. They are editable and deletable via the front-end. The notes will be sorted in order of their creation. Line breaks and HTML are currently not supported.

The module notes can be downloaded via the TYPOlight Wiki.

Addressbook


Addressbook is a TYPOlight module which lets you manage your addresses via TYPOlight. It shows the addresses in the front end (no editing possible). This list can be ordered by several criteria. By clicking on a contact more detailed information are visible. The module also has a birthday calender which shows the upcoming birthdays in the next 30 days and links to the email addresses if available.

WARNING: This module is only meant for internal use. It handles sensitive information, so NEVER make it publicly visible. Always require the users (who are allowed to access those information) to log in.
Please handle the personal data of others with care.

The module can be downloaded via the TYPOlight-Wiki.