Jonasfj.dk/Blog
A blog by Jonas Finnemann Jensen


March 19, 2011
Version 0.10 of zbar-sharp is out…
Filed under: Computer,English,zbar-sharp by jonasfj at 9:50 am

Being slightly bored with school work I decided to take day off and work on zbar-sharp, and a few minutes ago I tagged a new release of zbar-sharp. These improvements have been underway for quite a while, and many of them have been available in the repository on github for a long time. And if you plan to use zbar-sharp I’ll recommend that you checkout the git repository once in a while.

The highlights of this release are:

  • ZBar.Image: Constructor for loading from System.Drawing.Image (e.g. Bitmap import)
  • ZBar.Image: Fix for nasty memory management issue in ZBar.Image.Data
  • ZBar.Image: Convenience function for FourCC codes.
  • ZBar.Symbol: Support for QR-codes (thanks to ZBar)
  • GtkZBar.Scanner: Support for rotation (Special thanks to Patrick McEvoy)
  • ZBar: Version by (Special thanks to Brandon McCaig)
  • Tests: Unit tests to test zbar-sharp and ZBar.
  • Improved and reorganized examples…

In particular support for initializing ZBar.Image from an instance of System.Drawing.Image is very nice. Notice that System.Drawing.Bitmap is a subclass of System.Drawing.Image, so this constructor allows you to load images from files into a ZBar.Image that can be scanned.

However, this feature would have been fairly unstable without a fix for the memory management issue in ZBar.Image.Data, which previously caused applications to crash at random. A thanks to the nameless commentor by the name thedarkking, who’s comment finally gave me a clue as to where the bug was.

By the way, if you have any comments or questions don’t be afraid to leave a comment.You’re also welcome to use the issue reporting system at github to report bugs or feature requests.If you wish to contribute, just fork the project on github and push your code.



January 31, 2010
zbar-sharp, now bugfixed and pushed to github
Filed under: Computer,English,zbar-sharp by jonasfj at 8:02 am

I’ve long been wanting to play with Git, but have either missed the time or the reason… Anyway, as I discovered a minor bug in the zbar-sharp bindings I recently released… I figured this might just be the kind of project I could push to github, and either forget or bugfix depending on what mood I’m in when a bug is discovered… 🙂
So I’ve created a github repository for zbar-sharp, to which I’ve published a minor bugfix… I’ve also managed to publish the documentation there… it was a bit tricky, because GitHub only wants to serve HTML files if they’re in a special branch… Nevertheless I succeeded… And zbar-sharp can now be found here:

By the way did I mention, git is really nice… I just had a little fun making a bugfix branch and merging it…



December 30, 2009
ZBar bindings for C#
Filed under: Computer,English,zbar-sharp by jonasfj at 6:58 am

gtkzbar-sharp-exampleAs part of the food management system my group made this semester, we wrote bindings for ZBar and based on those a bar scanning widget for Gtk#. Anyway, I figured it might be useful somebody else, so I’ve been using a few days cleaning up the ZBar bindings, extracting the Gtk# widget from our UI-mess and writing a simple example of how to use it.

The result is bindings for a subset of ZBar and a Gtk# bar scanning widget. I don’t intend to maintain the source, but if you find any bugs etc. or wish to start a project for the bindings, please leave a comment…

The example application using the bar code scanning widget can be seen on to right. Note: this was a really lousy webcam :). The check-mark appears when a bar code have been recognized and then fades away.

In Foodolini we used HAL to detect webcams as they were plugged, however, having heard that Ubuntu will be deprecating HAL, I didn’t care to clean up the source for this feature. If you interested it can be found in the source for Foodolini. And if anybody should happen to know how to detect webcams, distro independently, without HAL, please leave a comment…