pdfgen, an image-to-PDF converter tool

(December 14, 2009)

Converting images of scanned documents into proper PDF files is quite a hard task. What I usually want is

  • put the images on a page of a well-defined size (e.g. A4 or Letter)
  • don’t resample the image data
  • have precise control over compression – in particular, I want to use JPEG images as-is, without any recompression

This sounds simple and reasonable, but I’ve yet to find a tool that does exactly that. Adobe Acrobat handles the latter two constraints well, but I don’t know how to set the paper size when importing an image. This is no problem when using a normal vector graphics or page layout tool, but then you usually don’t have much influence on what nasty things the PDF output code does to your images. Furthermore, you mostly end up with useless cruft in the PDF files, like XML metadata or even fonts (even though there’s not a single letter of text anywhere in the document). So I decided to end this mess once and for all and write my own image-to-PDF converter. Here it is: pdfgen.
Read more …

Proposal: A file system for Live CDs

(August 20, 2009)

CDs or DVDs containing a full Linux system for installation, testing, repair or other special purposes are quite common these days. Chances are high that people make their first steps with the Linux, BSD or Solaris operating system using these so-called Live CDs: They are convenient (no need to install the OS), they are safe (doesn’t write anything to disk unless you really want it to) … but they are slow. Booting from a Live CD like Knoppix or the Ubuntu Desktop CD takes ages and makes you wonder if your CD/DVD drive will actually survive that whole operation, considering that it is permanently seeking. And even if you made it to the desktop, you’ll still have to be patient if you intend to open any application, because the drive has to spin up again and load libraries and data for whatever program you start. Or even worse: In the modern GUI-based environments you have to wait for icons to load even if you just click on a launcher menu. As useful as those Live CDs might be, this a major source of annoyance.

In this post, I will present a method to solve this problem. I do not claim to be the first one to invent it – in fact, I refuse to believe that no one had this idea before me.
Read more …

NanoJPEG: a compact JPEG decoder

(April 29, 2009)

If you followed my works, you know that I like compact, single-file implementations of decoders for various media formats, and where such a thing doesn’t exist, I tend to write or at least port one myself. Now I’d like to add the third format to that list: Baseline JPEG images.
Read more …

Four generations of iPod nanos compared

(February 16, 2009)

Over the last few years, I bought one specimen of all four generations of Apple’s iPod nano media player, mainly to make rePear compatible with each new model. (In fact, rePear’s main development target are iPod nanos.) Here are my thoughts about the benefits and drawbacks of each generation.
Read more …

Late Christmas Gift: A Wallpaper Generator

(December 30, 2008)

This post and the software described in it were originally planned to be released before or on December 24th, but I didn’t manage to finish either. So consider my random wallpaper generator as a late christmas gift.

The idea for this program was born rather quickly: I wanted to have some nice and fancy desktop background images (»wallpapers«), and I wanted them to change every day. This is nothing new, I already did that in the past by writing scripts that choose one random image from a certain directory, scale them to fit on the screen and use them as wallpaper. This approach is simple and common; it’s supported by all major desktop enviroments now, if I remember correctly. However, it has two drawbacks: First, you need to update the pool of available images every now and then so it doesn’t get boring. Second, everyone who’s looking at your desktop (maybe because you do a presentation, or you want to show something, or you requested some help) will be distracted by the wallpaper. You’ll likely end up talking about the things that can be seen on the wallpaper rather than the real subject.
A proper solution for this is having a generator that procedurally creates random images that are suitable as background images – that is, nice, soothing images that don’t distract too much. Basically the kind of background images that shipped as default in Ubuntu up to 7.10 and Mac OS X up to 10.4. My program is trying to do exactly that.
Read more …

Back again

(December 22, 2008)

I want to apologize for the lack of posts here. I know that many people want to know the outcome of the Apple thing and the status of the two jeopardized programs. So, to finally break the much too long period of silence, here’s the current status of the projects:

The presentation program is online again under its new name Impressive: http://impressive.sourceforge.net. Currently, there’s only a rebranded 0.10.2 version, but I hope to move forward with a new version in the first quarter of 2009.

The iPod management tool has been renamed to rePear: http://repear.sourceforge.net/. Along with the rename, the brand-new and much improved version 0.4 has been released.

I find it unfortunate and unnecessary that the issue needed to be settled involving layers and lots of money. It would have been easier for both sides (and certainly more civilized) to simply write an e-mail to state the problem. I am willing to co-operate. You can still call your lawyers if I don’t comply, but I don’t see any reason why there should be money involved from the start.

Read more …

CENSORED 0.4.0 Beta Test Started

(April 13, 2008)

After a long, long time I can finally (and proudly) present a nearly finished new version of CENSORED, the iPod management tool. The main highlights in this release are support for some new models (iPod classic and »fat« nano), AAC and (experimental) video support, import of Play Counts and upload to last.fm and a lot of other new features and bugfixes. Though the code is already finished, I can’t publicly release a full version yet because of two reasons: First, the documentation needs to be updated and second, I need an official Client ID from last.fm to legally upload (»scrobble«) play statistics, but the guy who is responsible for those seems to be very busy with other stuff at the moment.

So instead of releasing CENSORED 0.4.0 straight away, I’m doing a non-public beta test now. Users who helped me with the new version or otherwise expressed interest in it have already been invited. If you are also interested and have not received an invitation yet, just send me an e-mail.
Read more …

nVidia driver bug?

(July 8, 2007)

While testing my current work-in-progress demo on my brand-new Vista-powered and GeForce-8-equipped laptop, I noticed some really strange rendering glitches. Since this was the only machine where the bug occured, so I thought it would be some bug in my code that caused incompatibilities with that particular driver version for that particular chip revision or perhaps Vista. However, a friend had the very same problem on a GeForce 7 card, Windows XP and a much older driver than the one I use on my main development PC, which has a nVidia card, too. This meant that the problem needed some serious debugging :)
Read more …

The art of shuffling music

(May 11, 2007)

Everyone knows and loves it: The »shuffle« function that is included in every disc- or memory-based music player. If you don’t feel like chosing your »playlist of the day« when you want to listen to your music, you just turn on the shuffle mode and off you go with the finest collection of all tracks on your CD or MiniDisc or hard disk or flash chip. This feature is so popular that a certain computer manufacturer once successfully introduced a MP3 player that was actually based on the shuffle option.

However, there’s something wrong with virtually every shuffle implementation: It’s random.
I can already hear you saying »He gotta be kidding! Randomness is what shuffling is all about!« Well, you’re right. Mostly. The problem with conventional shuffle algorithms is that they are too random. They lack fairness and uniform distribution.
Read more …

Antenna improvisation

(March 31, 2007)

When I wanted to watch an episode of The A-Team in TV today, I was surprised by a black screen instead of Hannibal Smith and B.A. Baracus. What happened? At first, I thought the TV software couldn’t cope with the graphics driver I updated today to get a specific game working (we’re talking about Windows here, as you might have guessed :). I became skeptical when the same problem happened to another TV viewing program and even the Linux-based external DVB-T tuner box I have. Something has been wrong with my antenna feed.

Long story short, it turned out to be (most likely) a power outage in the attic where the antenna amplifier is located. For reason’s I’m not going to discuss here, there was no way to fix the problem in time, so I had to live without TV for a day – which would not have been a problem, if it hadn’t been for the boxing match between Henry Maske and Virgil Hill tonight. I really wanted to see this, but since there was no way to make the antenna system working again, I resigned. I phoned my father at home to have him record the fight, and while we were at it, he gave some tips on how to temporarily solve the problem. You know, stuff like »use some uninsulated wire«. Since I don’t have any uninsulated wire in my apartment, I tried the other suggestion: Use the antenna cable and put a screwdriver into it (this works because the center of the plug has a little hole in it). To my great surprise, this actually worked! After some experimentation, I found that the optimal position of this »poor man’s antenna« is close to the window. So I fiddled around a bit and hung the weird construction somehow into the window blinds. The whole thing works like a charm and now I can watch Maske’s (supposed) comeback fight in perfect quality even though the antenna feed is broken.