This is a quick hack for an image viewer/converter for MS-DOS
People on DOS ain't dead asked if it would be possible to create such a program for MS-DOS supporting modern image formats. As I had quite a lot of the necessary code already available from DOjS I decided to give it a try.
DosView
uses Allegro to display the images, it should support all available VESA modes.
The default screen format is 640x480 with most number of bpp, see below for other options.
Please note: Although DosView
should work from a i386 upwards, this programm can eat huge amounts of RAM (>64MiB) if you feed it large images and/or screen sizes.
Binary downloads are available on the Releases page.
UPXVIEW.EXE
is the same binary as DOSVIEW.EXE
but compressed with UPX 4.2.1.
The source is on GitHub
- BMP
- PCX
- TGA
- LBM
- QOI
- JPG
- PNG
- WEBP (using the
.WEB
file extension) - TIFF (using the
.TIF
file extension): only first image - JPEG 2000 (using the
.JP2
file extension) - PBM PPM
- RAS
- GIF: only first image
- PSD: composited view only, no extra channels, 8/16 bit-per-channel
- HDR: radiance rgbE format
- PIC: Softimage PIC, untested
- BMP
- PCX
- TGA
- QOI
- JPG: quality can be controlled with
-q
. - PNG
- WEBP (using the
.WEB
file extension): always lossy, quality can be controlled with-q
. - TIFF (using the
.TIF
file extension), LZW compression only - JPEG 2000 (using the
.JP2
file extension) - PBM
- RAS
- GIF: uses dithering which is extremly slow
Usage:
DOSVIEW.EXE [-hkl] [-q <quality>] [-r <num>] [-s <outfile>] <infile>
-h : show this screen.
-l : list know screen modes.
-r <num> : screen mode to use (use -l for a list).
-s <outfile> : do not show the image, save it to outfile instead.
-f <factor> : scale saved image, <1 reduce, >1 enlarge (float).
-q <quality> : Quality for writing JPG/WEP/JP2 image (1..100). Default: 95
ESC
/Q
: quitF
: show actual sizeZ
: fit to screenI
: toggle image infoPAGE UP
/9
: increase zoomPAGE DOWN
/3
: decrease zoomUP
/8
: move image upDOWN
/2
: move image downLEFT
/4
: move image leftRIGHT
/6
: move image rightSHIFT
: move/scale 2x as fastCTRL
: move/scale 4x as fastALT
: move/scale 8x as fast
SHIFT
, ALT
and CTRL
can be used in any combination.
Please see the attached LICENSE file for the license of all involved libraries/files.
- error handling is a mess
- code is badly documented
- PIC is untested (I could not create an image)
- some versions of DOSBox-X can't write TIFF images (known issue, SQLite3 has problems in these versions, too)
- can be very slow on old machines (especially saving/dithering)
- eats HUGE amounts of memory (we are talking >128MiB to encode a 2672x2004 JPEG2000)
- if loading/saving fails you get no info why (if you are not running a debug build that is)
- image conversion always needs a working display mode (Allegros fault)
- Fixed Allegro VESA driver
- Added screen mode autodetection
- new screen resolutions and change in command line
- (hopefully) fixed bug in image zooming when image was not 4:3 and a multiple of the resolution
- fixed color palette error
- added GIF
- added PSD
- added HDR
- added PIC
- added an UPX compressed EXE
- enabled dithering
- added 8bpp display mode
- fixed another scaling error
- fixed error when reading certain PNGs
- added NetPBM formats
- added Sun RAS format
- added imiage scaling
- added TIFF
- added JPEG 2000
- fixed zoom and documentation
- added 24/32bpp autodetection
- added image info
- added num pad keys
- added check to list modes
- first public release