Original Image - scaled to 560 x 384 x 24-Bit BMP |
|
DHGR 140 x 192 x 16 color Buckels Dither |
DHGR 560 x 192 Monochrome Buckels Dither 25% Reduced Color Bleed |
Bmp2DHR is a command-line utility for converting BMP files to Apple II Double Hi-Res (DHGR) screen images. It is written in Ansi C and is distributed with source code and a Win32 binary. Linux and Mac versions are also available.
It was written as part of a larger project which aims to support writing programs for all the Apple II Graphics modes including Super Hi-Res (SHR) using the cc65 C compiler. But the output from Bmp2DHR is not tied to any programming environment.
Nor is the Bmp2DHR source code tied to any Ansi C compiler. The Win32 version is built with MinGW, but can also be built with Visual Studio’s 32-bit Microsoft C. The Linux and Mac versions are built with gcc, and the MS-DOS version is built with Turbo C Version 2.01 Copyright (c) 1987, 1988 Borland International (Large Memory Model), but can also be built with 16-bit Microsoft C (Large Memory Model).
Bmp2DHR is not “bloat-ware” and its memory requirements are comparatively modest by design so it has no trouble running in MS-DOS or in an MS-DOS emulator like DOSBox and other MS-DOS emulators, some that even run on new-fangled phones.
However, there is one fundamental difference between MS-DOS and more modern operating systems that affects Bmp2DHR’s functionality.
A 128 character command line is probably long enough for Bmp2DHR’s commands.
The only “real difference” in functionality between the MS-DOS binary and binaries for more modern systems like the Win32 binary is that since MS-DOS uses short file names and the 8.3 file naming convention, all input and output file names are limited to 8-character names with a 3-character extension. Because of this, Bmp2DHR’s optional CiderPress file attribute preservation tags can’t be used for output in the MS-DOS binary.
Original Image - scaled to 560 x 384 x 24-Bit BMP |
|
DHGR 140 x 192 x 16 color Buckels Dither |
DHGR 560 x 192 Monochrome Buckels Dither 25% Reduced Color Bleed |
Bmp2DHR uses automatic naming for all file output. Modern systems support long file names. For naming of BMP output, Bmp2DHR uses the “base-name” of the original BMP input file for a “handle” and appends an underscore followed by the output type. MS-DOS does not support long file names so a 3-character file extension is used instead.
Original Image - scaled to 560 x 384 x 24-Bit BMP |
|
Buckels Dither |
Buckels Dither 25% Reduced Color Bleed |
Original Image - scaled to 560 x 384 x 24-Bit BMP |
|
Buckels Dither |
Buckels Dither 25% Reduced Color Bleed |
For default Apple II DHGR image file output on modern systems, Bmp2DHR uses the “A2FC” file extension. In MS-DOS Bmp2DHR necessarily shortens “A2FC” to “2FC”. (This naming convention is consistent with what I have done in the past with my previous MS-DOS DHGR conversion utilities.)
The table below lists the specific naming differences between Bmp2DHR’s BMP output naming convention for systems that support long file names, and MS-DOS:
Option |
Description |
Long Name Type |
MS-DOS Extension |
“V” |
Preview BMP |
_Preview.bmp |
PMP |
“VBMP” |
VBMP compatible BMP |
_VBMP.bmp |
VMP |
“DEBUG” |
Reformatted BMP |
_Reformat.bmp |
RMP |
“DEBUG” |
Scaled BMP |
_Scaled.bmp |
SMP |
It is also probably important to note that the debug option noted above uses different work files depending on the BMP input file size and bit-depth and whether the color error diffusion option has been selected (a DIB work file is processed if so). Since Monochrome output uses no work files, the debug option has no effect
Listed below is a summary of Bmp2DHR’s available output. Aside from the naming differences previously noted (including unadorned file names without CiderPress tags), the MS-DOS executable uses the same naming as Bmp2DHR’s binaries for systems that support long file names.
Note: Full-Screen
(default) output and Image Fragment (Option “F”) output is mutually exclusive.
All Apple II file output will be full-screen unless Option “F” is on.
Like MS-DOS and Apple II DHGR graphics, Bmp2DHR is a “Classic” file converter. There is nothing in Bmp2DHR that could not have been done during the 1980’s when MS-DOS enjoyed wide use. Even Bmp2DHR’s Version 3 BMP input and output files existed in Windows 3.1 which ran on MS-DOS when the Apple IIgs still enjoyed relatively wide use, and the psycho visual color mapping could have been done then too.
Original Image - scaled to 560 x 384 x 24-Bit BMP |
|
DHGR 140 x 192 x 16 color Buckels Dither |
DHGR 560 x 192 Monochrome Buckels Dither 25% Reduced Color Bleed
|
But since Bmp2DHR did not exist, DHGR was left behind by “progress”.
DHGR 140 x 192 x 16 color Buckels Dither |
DHGR 560 x 192 Monochrome Buckels Dither 25% Reduced Color Bleed |
With the release of the IIgs and its more capable Super Hi-Res (SHR) Graphics even the Apple II users of the day lost interest in DHGR and the talent that would have been required to take Bmp2DHR forward followed SHR instead just as it had followed the Macintosh instead of DHGR when DHGR was young.
Original Image - scaled to 560 x 384 x 24-Bit BMP |
|
DHGR 140 x 192 x 16 color Buckels Dither |
DHGR 560 x 192 Monochrome Buckels Dither 25% Reduced Color Bleed |
Even Bmp2DHR’s reduced color bleed error diffusion dithering was pioneered on the Mac by Bill Atkinson. Steve Jobs had declared the Apple II dead around the same time that DHGR was introduced. Apple Computer never attempted anything even close to the capabilities of Bmp2DHR for the Apple II despite the fact that the technology was available from the time of the very beginning of DHGR.
Buckels Dither |
Buckels Dither 25% Reduced Color Bleed |
At the beginning of DHGR the Apple II user had little access to scanned images or disk media large enough to hold many of them. Desktop Publishing was just being invented on the Macintosh. Most computer graphics on the Apple II were painstakingly created by hand. The time was just beginning for mainstream photo-realistic computer graphics.
Original Image DHGR 140 x 192 x 16 color |
DHGR 560 x 192 Monochrome Atkinson Dither |
Original Image - scaled to 560 x 384 x 24-Bit BMP |
|
Buckels Dither |
Buckels Dither 25% Reduced Color Bleed |
By the time monochrome scanning progressed to color scanning and true-color graphics arrived in the larger IBM-PC market, the Apple IIgs with SHR graphics was introduced and DHGR became even more ignored. After the release of Jason Harper’s “][gif” which took DHGR as far as it went, even Jason Harper lost interest in DHGR.
Original Image - scaled to 560 x 384 x 24-Bit BMP |
|
Buckels Dither |
Buckels Dither 25% Reduced Color Bleed |
Original Image - scaled to 560 x 384 x 24-Bit BMP |
|
Buckels Dither |
Buckels Dither 25% Reduced Color Bleed |
When Steve Jobs took Andy Hertzfeld from the Apple II development team and added him to the original Macintosh development team so long ago, he told Andy that “the Apple II will be dead in a few years”.
Years later, in 1987, with IBM’s release of OS/2, Microsoft
began an advertising campaign announcing that "DOS is Dead".
Yet in 2009 I
added DHGR support to the Aztec C65 MS-DOS cross-compiler for the Apple II and
everything seemed to be in good working order. So it turns-out DHGR was not
dead after all. And when I threw together some standard parts and wrote
Bmp2DHR, I realized that DHGR had been patiently waiting all along.
Original Image - scaled to 560 x 384 x 24-Bit BMP
|
|
Buckels Dither |
Buckels Dither 25% Reduced Color Bleed
|
Download Bmp2DHR at the following links:
Win32 and latest version complete with source:
http://www.appleoldies.ca/cc65/programs/dhgr/bmp2hr.zip
MS-DOS: http://www.appleoldies.ca/cc65/programs/dhgr/bmp2dhrMSDOS.zip
Other: (Linux, OSX): http://hoop-la.ca/apple2/appleoldies/bmp2dhr/
Original Image - scaled to 560 x 384 x 24-Bit BMP
|
|
Buckels Dither |
Buckels Dither 25% Reduced Color Bleed
|
The images in
this document were all converted to DHGR with the MS-DOS version of Bmp2DHR.
All the best,
Bill Buckels
October 21, 2014
Bmp2DHR is
dedicated to both Sheldon Simms and Cybernesto for the inspiration to actually do
something more with DHGR by providing benchmarks that were better than were
ever available when DHGR was in wider use. Sheldon also took the time to
(finally) offer a working Windows Binary of his tohgr
program, and made his source code available for review.
The MS-DOS
Version of Bmp2DHR is dedicated to Brian Piltz for
reminding me that MS-DOS is as alive as DHGR and the Apple II, and that the Turbo C compiler that David
Intersimone made available is still alive too, and
working for Bob.