Hyperfocal Distance and DoF Calculator (desktop application)

It’s been a while since I’ve been listening about Adobe AIR Framework, and I’ve always wanted to make a desktop application using HTML, JavaScript (on jQuery) and CSS. All of that, and it’s cross-platform, finally I wrote my first application that runs on Mac OS and Linux (although I didn’t test it on anything but Windows, so confirmations are very welcome).

About the application

Hyperfocal Distance and Depth of Field Calculator LogoHyperfocal Distance and Depth of Field Calculator is an application which can be used to calculate the Hyperfocal distance and Depth of Field values depending on the following lens and camera sensor properties.

Hyperfocal Distance:

  • Circle of Confusion (depends of Sensor/Film type)
  • Focal Length
  • Aperture

Depth of Field:

  • Circle of Confusion (depends of Sensor/Film type)
  • Focal Length
  • Aperture
  • Hyperfocal distance (calculated from above parameters)
  • Subject distance

Hyperfocal Distance and Depth of Field Calculator is a desktop application developed in Adobe AIR Framework and should run on:

  • Mac OS (some confirmation, please)
  • Linux (some confirmation, please)
  • Microsoft Windows 7 (confirmed)

In order to run Hyperfocal Distance and Depth of Field Calculator, you must:

  1. install Adobe AIR Framework 2.6 (or later),
  2. download Hyperfocal Distance and Depth of Field Calculator installation package,
  3. run the installer (hfd-dof-0.5.0.air)
  4. now you can run the executable…

Using a scanner without dialogs in .Net

I recently had the task to create a sort of a web-interface for a scanner device (amongst other devices). The project is to be done in C# (Microsoft .Net Framework 4.0), so I had many helpful examples on how to do this, either by TWAIN or WIA libraries. Unfortunately all of these examples had one common problem, interrupting dialogs, either for scanning device selection, or the scanning options dialog, which were necessary to make the scan. As this is a web-interface, user will not be seeing any of these dialogs, so displaying them did just blocked the whole process.

After much searching I finally found an actually useful post on Windows Image Acquisition, which by the way also had a blocking dialog, but this was easily modified and in moments I had a simple class with a Scan(string scannerId) function which would do just that, Scan with a selected device and nothing more. More on scanning without dialogs in .Net…