Doffy

A Depth-of-Field Table Generator

Back to the Nitty-Gritty section,
with articles on technical aspects of photography.

Doffy is a simple Windows application to generate depth-of-field (DoF) tables as per your instructions. The usual output format is HTML, so that you can view the file in your Web browser just by double-clicking on it; while doing that you can also print it out. Here is an example; the table layout will be explained below.

Downloading Doffy

doffy.zip — the whole package, less than 500 kB

While I remain the copyright holder of the software, you are free to use it as you wish. If you publish the results in any way, give Doffy a credit — as a matter of good manners rather than a legal obligation.

Installation

None: just unzip the archive so that the doffy\ folder is easy to find. It should contain the following files:

  • doffy.exe — the executable, i.e. program itself;
  • doffy-whats-new.txt — a text file with update information;
  • doffy.doff — a setup file with detailed description of all parameters;
  • doffy-*.doff (where '*' means "anything") — a bunch of other .doff files, which you can discard, modify, whatever;
  • doffy.css — Doffy does not use this file, but your browser does, when showing the generated file; therefore wherever you move the HTML output to another location, a copy of doffy.css has to follow.

If you wish, you may create a shortcut to Doffy on your desktop or Start Menu.

To uninstall, delete the Doffy folder.

Preparing the .doff file

This is a plain text file with a complete definition of the table to compute and its format. It is highly recommended that for each new table you create a new .doff file, so that at any moment you can come back to it, do any necessary changes, and generate the tweaked version.

The best way to start is to make a copy of doffy.doff under a new name, say, mzd-40-150-pro.doff, in the same folder where all Doffy files are. Then use a text editor (like Notepad, not a word processor!) to open and edit that new file. You will see something like this:

: FIRST OF ALL: any line starting from a colon is ignored, being just a comment. [DOFFY] : Make sure that the [DOFFY] line above is intact! HTML = 1 : If 1, the output will be in HTML format, suitable for viewing in a Web browser; : if 0 - just a text table, to be printed as text or imported into a spreadsheet. Comment = DOF tables computed for the ???? sensor frame : This text will be inserted at the top of the page, wrapped if necessary. : Use the <br> tag to insert your own line breaks. TableOnly = 0 : If 1, then only the table part of the HTML will be generated, for manual insertion : in your own code. If 0, a ready-to-view, complete page will be produced. Relative = 1 : If 1, the DOF values will show the offsets from the focus plane (recommended); : If 0, absolute distances from the lens will be used. CoC = 0.015 : Circle of confusion (diameter), in millimeters. Common values are 1/1500 or 1/1440 : of the frame diagonal: .030 for full frame, .015 for mFT, see the article. Multiplier = 2 : Focal length multiplier proper for the sensor size. Not used in DoF calculations; : only to show the EFL in table headers. If 0, EFL is not shown. Focal = 11 14 18 25 50 75 100 150 200 : Up to 64 values (mm) of focal length (actual, not equivalent), space-separated. : A separate table section will be created for every focal length. Distance = 0.5 0.6 0.8 1.0 1.5 2 3 4 6 10 15 20 30 40 60 80 100 200 : Up to 64 values of focus distance (meters). For each, a table row will be created : in every section. Distances too small or too large for a given focal length will : be skipped (inaccurate or uninteresting results, respectively). : An extra row shows hyperfocal distances for all F-numbers. Aperture = 2.8 4.0 5.6 8 11 16 22 : Up to 64 values of aperture (F-number). For each, a table column is created.

I don't think any more explanations are necessary. Just make sure you've got the CoC and Multiplier right (or set the latter to 0), and watch out when typing the lists of distance, aperture, and focal length values. You should be just fine.

Running Doffy

There are at least three ways to do it.

  1. The Girlie Way

    Double-click at the Doffy Icon. The program will ask you, in a command-line window, for the .doff file name, so enter it, like mzd-40-150-pro.doff — done.

  2. The Smartass Way

    Double-click on the .doff file icon. Windows will ask you to assign a program to handle .doff files. It is a painful process, but you do it only the first time. From now on you run Doffy by double-clicking on the .doff file. Look, Ma: no hands!

  3. The Manly Way

    Open the command line window, navigate to the Doffy directory (that's the manly word for folder), enter program name followed by that of the .doff file, like

    doffy mzd-40-150-pro.doff

Doffy will run for a fraction of a second, and before terminating it will call your assigned Web browser showing the newly-created DoF table. The file name is the same as that of the setup file, except for the .html extension — mzd-40-150-pro.html in our example.


Back to the Nitty-Gritty section,
with articles on technical aspects of photography.

Home: wrotniak.net | Search this site | Change font size

Photo News | The Gallery


Posted 2017/06/12; last update 2017/12/17 Copyright © 2000-2017 by J. Andrzej Wrotniak