Documentation/Image Modules
Subject: Image Modules
Author: Lonny Pursell
HTML conversion created with STG2HTML v0.75
Written by Lonny Pursell and ENCOM
Note: Images are not supported.
Index
Main
LP's Image Module Pack
Installation Instructions
Developer's Corner
Image Module Extension(s) Encoder Animation Exif
------------ ----------------------------------- ------- --------- ----
ANIMASTR ASB MSK - yes -
ANIMATIC FLM - yes -
ARABESQUE ABM PUF - - -
ART ART - - -
ASCII TXT yes - -
BMP BMP yes - -
CALAMUS CRG - - -
CANVAS CPT CNV FUL - - -
CEL CEL - - -
CLRBURST BST - - -
COKE TG1 yes - -
COLR MUR - - -
COMPEYES CE1 CE2 CE3 - - -
CRACKART CA1 CA2 CA3 - - -
CYBRMATE DLT - yes -
DALI SD0 SD1 SD2 LPK MPK HPK - - -
DEGAS PI1 PI2 PI3 PC1 PC2 PC3 - - -
DEGASX PI4 PI5 PI6 PI7 PI9 - - -
DELMPNT DEL DPH - - -
DESKPIC GFB - - -
DGRAPH P32 P3C - - -
DOODLE DOO - - -
DUNGRAPH DG1 DC1 - - -
DUO DUO DU1 DU2 - - -
EGGPAINT TRP yes - -
ESM ESM yes - -
EUREKA RAW - - -
EZARTPRO EZA - - -
FLIC FLC FLH FLI - yes -
FNT FNT SYS - - -
FTC FTC XGA - - -
FULLSHOW KID KIL KIT - - -
FUNNYPNT FUN - - -
GEMIMG IMG yes - -
GEMMETA GEM - - -
GFARTANI SAL SAH - yes -
GFARTFNT GFT - - -
GFARTIMG SUL SCL SUH SCH - - -
GIF GIF - - -
GODPAINT GOD yes - -
HRM HRM - - -
IFF IFF ILB LBM ACB BL1 BL2 BL3 - - yes
IFFDCTV DCT - - yes
IFFRGBN TSI - - yes
IMAGELAB B&W B_W - - -
IMAGIC IC1 IC2 IC3 - - -
IMGSCAN RWL RWM RWH - - -
INDYPNT TRU yes - -
INSHAPE IIM yes - -
JPEG JPG yes - -
JPEGDSP JPG - - -
MACPAINT MAC - - -
MEGAPNT BLD - - -
MPP MPP - - -
MSPAINT MSP - - -
NEOANI ANI - yes -
NEOIMG NEO - - -
PABLOPNT PPP PA3 - - -
PAINTPRO PIC - - -
PBLCPNTR CMP - - -
PCHROME PCS - - -
PCI PCI - - -
PCL PCL yes - -
PCX PCX - - -
PICPACKR PP1 PP2 PP3 - - -
PICWORKS CP3 - - -
PIXART PIX yes - -
PL4 PL4 - - -
PNG PNG - - yes
PNM PBM PGM PPM yes - -
PNTSHOP PSC DA4 - - -
PNTWORKS CL0 CL1 CL2 SC0 SC1 SC2 PG0 PG1 PG2 - - -
POFOANI PGX - yes -
POFOIMG PGF PGC - - -
PRISMPNT PNT TPI - - -
PRO89XX HIR - - -
PSX TIM - - -
QPAINT PBX - - -
RAGD RAG - - -
REMBRNDT TCP - - -
RGB RGB - - -
SEQ SEQ - yes -
SIGNUM IMC - - -
SPEC512 SPU SPC SPS - - -
SPECX SPX - - -
SPOOKY TRE - - -
SSB SSB - - -
STAD PAC - - -
SUN SUN RAS yes - -
SYNARTS SRT BIT - - -
TARGA TGA yes - yes
TIFF TIF yes - -
TINY TNY TN1 TN2 TN3 TN4 TN5 TN6 - - -
ZZROUGH RGH - - -
------------ ----------------------------------- ------- --------- ----
Image Module Option(s) Description
------------ --------- --------------------------------------
ASCII 0 always dos cr/lf (70 characters)
BMP 0 always uncompressed 24-bit TC (v3)
COKE 0 always uncompressed 16-bit HC
EGGPAINT 0 always uncompressed 16-bit HC (TRUP)
ESM 0 always uncompressed 24-bit TC
GODPAINT 0 always uncompressed 16-bit HC (G4)
GEMIMG 0 always uncompressed 24-bit TC (v1)
INDYPNT 0 always uncompressed 16-bit HC
INSHAPE 0 always uncompressed 24-bit TC (Type 4)
TARGA 0 always uncompressed 24-bit TC (Type 2)
SUN 0 always uncompressed 24-bit TC (Type 1)
PCL 0 always uncompressed 24-bit TC (Level 5)
PIXART 0 always uncompressed 24-bit TC (v2)
PNM 0 always uncompressed 24-bit TC (P6)
Built with PureC v1.1m
Image modules should be FireBee compatible, if not, please contact me.
A growing list of all known paint programs.
Additional credits.
WWW: http://gfabasic.net/
IRC: lp @ #Atariscne @ IRCnet
ICQ: lp # 25342937
Default
The requested document was not found.
Help
Page not found.
Lonny Pursell
WWW: http://gfabasic.net/
GFA-Basic
GFA-Basic is the best BASIC for the Atari!
credits
Some image modules use portions of code written by Hans Wessels.
The code segments where taken from IrfanView, which Hans placed in the
public domain. However, I cannot take credit for his work. ;o)
His name appears here in the docs and the image modules which are based on
his work.
The DCTV image module is based on code by Cholok. Used with permission.
I also should mention Toni Wilen (WinUAE maintainer) for helping as well.
H.-J. Berndt the author of Public Painter supplied his decompression code.
Olivier Landemarre for information about the InShape file format.
Vincent Rivière for his m68k-atari-mint cross-tools
Philipp Donzé for his Mac port of m68k-atari-mint cross-tools
Thorsten Otto for his gcc library builds
Testing:
GokMasE, SWE, AtariTrek
Installation Instructions
First time users of my image modules:
The image modules should be installed by default at
c:\gemsys\imgmod\
Environment variable IMG_MOD_PATH= can be used if you would like to install
them to a custom path.
Note that ImgView doesn't need to be restarted when adding or removing image
modules. ImgView does not keep any image modules resident.
Updating the image modules from an older installation:
If you have already installed my image modules and are updating them, once in
awhile I rename one. For this reason you should delete all the image modules
copy all the new ones into the folder.
Note: If two image modules would happen to be installed at the same time, that
accidentally handle the same file extender, the one found first will be used.
There's two JPEG image modules. Only install one!
If you have an Atari Falcon030 you have the option of using the Brainstorm
DSP Decoder.
JPEG.IM -> decode via CPU
JPEGDSP.IM -> decode via DSP
Renaming one of them *.IMX to disable it.
paint programs
Name Codec Comment
------------------------------- -------- -----------------------------------
Animaster ANIMASTR
Animatic ANIMATIC
Art Director ART
Atari Portfolio Graphics POFOIMG
Atari Portfolio Animaiton POFOANI
Autodesk Animator FLIC
Calamus CALAMUS
Canvas CANVAS supports rasters
COKE COKE
ColorBusrt II CLRBURST supports rasters (v1.2 only)
CrackArt CRACKART
C.O.L.R. Object Editor COLR
ComputerEyes COMPEYES
Cyber Paint CEL
Cyber Paint SEQ
Cybermate CYBRMATE
Dali DALI
Degas (Elite) DEGAS complete re-write
Degas (Font) FNT
DelmPaint DELMPNT
DeskPic DESKPIC
Dr. Doodle DOODLE
DuneGraph DUNGRAPH
EggPaint EGGPAINT
Eureka EUREKA zorro
EZ-Art Professional EZARTPRO
Falcon True Color FTC
FuckPaint DEGASX
Funny Paint FUNNYPNT
FULLSHOW FULLSHOW
GDOS Font FNT
GEM Bitmap IMG
GFA Artist (Image) ART supports rasters
GFA Artist (Font) GFT
GFA Raytrace GFARTANI
GFA Raytrace GFARTIMG
GodPaint GODPAINT complete re-write
Graphics Processor GP
ImageLab IMAGELAB
Imagic IMAGIC
IMG Scan IMGSCAN
IndyPaint INDYPNT
InShape INSHAPE
Jack-Paint DOODLE must rename files *.DOO
MegaPaint MEGAPNT
Multi Palette Picture MPP
NEOchrome NEOANI
NEOchrome (Master) NEOIMG complete re-write
Pablo Paint PABLOPNT
PaintPro ST PAINTPRO
PaintPro ST/PlusPaint ST PNTWORKS
PaintShop plus PNTSHOP
Palette Master ART supports rasters
PhotoChrome PCHROME supports rasters
Picture Packer PICPACKR
Picworks PICWORKS
PixArt PIXART
PlayStation PSX
Prism Paint PRISMPNT
Print-Technik Realtizer PRO89XX
Public Painter PBLCPNTR
QuantumPaint (Box) QPAINT
Rag-D! RAG_D
Rembrandt REMBRNDT
RGB Intermediate Format RGB
Signum SIGNUM
Slideshow Sinbad SSB
Spectrum 512 SPEC512
Spectrum 512 Extended SPECX
Spooky Sprites (TRE) SPOOKY
Spooky Sprites (TRP) EGGPAINT
ST Aided Design STAD
Synthetic Arts SYNARTS v1.0
The ArtiST ART
Tiny Stuff TINY
TruePaint PRISMPNT
Warp9 Font FNT
ZZ_ROUGH ZZROUGH
Enhanced Simplex ESM
Interchange File Format IFF partially written in GFA
Graphics Interchange Format GIF zorro (fixed some bugs)
Joint Photographic Expert Group JPG zorro
MacPaint MACPAINT
Microsoft Paint MSPAINT
Microsoft Windows Bitmap BMP
Portable Bit Map PNM
Portable Network Graphics PNG
Sun Raster SUN
Tagged Image File Format TIFF zorro
Truevision Targa TGA complete re-write
Art ST - no unique file format
Art Tutor - no unique file format
Colorchrome - no unique file format
Colorstar - can't find a working copy
Deluxe Paint - IFF
EC-Paint! - no unique file format
FLAIR paint - no info
GoldPaint - no unique file format
Grafx2 - ported by Saulot
HyperPaint - img
Monostar - can't find a working copy
OCP Art Studio (Avdanced) -
Paint Pro - can't find a working copy
Paintpot - no unique file format
PlusPaint -
Developer's Corner
Image Module Guide
Written by Lonny Pursell
12/21/2021 Rev 1, 1st public release
http://atari.gfabasic.net/ (get additional image modules)
https://www.dev-docs.org/ (sample images, search for "samples")
http://gfabasic.net/ (contact)
Please contact me if you find an error or something seems unclear.
Introduction
Handling file extensions
Loading overview
Saving overview
Image info structure
Using the image modules
Overview of image module functions
General program overview
Error handling
GFA-Basic source code
Dithering
Loading animations
Extracting exif data
Misc notes
Introduction
Yet another plugin format? Quite frankly I wasn't all pleased with the LDG
solution. If you don't use 'C' you're forced to install LDG.PRG (TSR) and
it's plagued with a memory leak. SLB is ok, but they're not usable from plain
TOS. SLB with callbacks is even worse as the complexity of the GFA-Basic code
required to use them seems to outweigh their usefulness just to save a few
bytes. My dream is to have these work on all operating systems without being
forced to install anything. I'm hoping others will adopt them and find them
useful.
These image modules don't require the installation of anything. They work with
SingleTOS, MiNT, MagiC, etc.
The image modules don't return ready to use dithered bitmaps. The caller must
take the image data returned from the image module and transform it into
something usable. That means if you want dithered images and blit'able bitmaps
you are on your own. That's not entirely true if one is willing to use NVDI
v5.03, however that's beyond the scope of this document.
Image modules will not flip upside down images right side up. The image module
will inform you if an image needs flipped right side up. Targa and BMP are good
examples. It's up to the caller to manage this as well.
Multiple image modules can be loaded simultaneously, but you will have to
manage multiple img_info structures. That's also beyond the scope of this
document.
Image modules return detailed information when rejecting an image file. Image
modules return zero (0) when a call is executed without an error. A return
value other than zero indicates an error. See table of error codes below. If an
error occurs the image module frees any resources it has allocated. The caller
doens't have to do anything special except for making the end user aware of the
the reason the image didn't load.
The image modules are based on zView plugins. The core functionality is the
same, however all the annoying shortcomings have been resolved. Image modules
are not compatible with zView.
Recap:
Pros: Load 90+ file formats, including complex formats like JPG, PNG, and TIF
Future proof, in that new image modules can be made
Caller doesn't need to know the technical details of the image files
Can be loaded and unloaded on the fly, reduced memory footprint
Cons: No dithering
Some images arrive upside down, caller must deal with this
Image data doesn't arrive blit ready
Handling file extensions
To properly handle file names like foo.bm or foo.jpeg the extension field
has been changed to 4 characters per entry. Example: "IFF LBM ILBMACBM"
They must be padded with spaces and the length of the string must be a
multiple of four.
There's no entry in the function table specifying the number of extensions
in the list. This is obtained easily with: count=LEN(ext_list$)/4
When doing comparisons the extra spaces need to be trimmed.
FUNCTION is_ext(ext$,ext_list$)
$F%
' ext$ target
' returns true or false
LOCAL f!
LOCAL tmp$
LOCAL i&
'
ext$=UPPER$(ext$)
'
FOR i&=1 TO LEN(ext_list$) STEP 4
tmp$=TRIM$(MID$(ext_list$,i&,4))
IF ext$=tmp$ !found match?
f!=TRUE
EXIT IF TRUE !exit loop
ENDIF
NEXT i&
'
RETURN f!
ENDFUNC
Loading overview
Regardless of the image file the image modules return image data in three
possible formats. The image module decides which format will best preserve the
image quality.
The three image data formats are:
1) Monochrome (black & white is assumed, no palette)
2) Color mapped (2 to 8 planes, palette is present)
3) 24-bit true color (direct color, no palette)
All three data formats could be considered chunky since none of them use
interleaved planes.
Images are processed one scan line at a time. You need a buffer large enough
to hold one scan line worth of data. It's probably best to move the data to
a larger buffer to hold the entire image or process the individual scan lines
as you go. That's up to you.
The data is returned in a scan line buffer supplied by the caller. The size of
the buffer should be: bufsize%=(width&*components&)+64
The "+64" is a small safety zone just in case the image module happens to
malfunction and overruns the buffer. If the buffer is too small the image
module will overrun and clobber who knows what and cause serious problems.
Pixel data is always written left to right.
For the sake of clarity lets say we have a sample image in all three formats:
Sample in this case is always 640x400
1) Monochrome:
minimum buffer size = 640 bytes
each byte represents 1 pixel
byte values will be 0 (white) or 1 (black)
B0, B1, B2, ... , B639
Palette: none (black & white is assumed)
components = 1
indexed_color = 0
2) Color mapped:
minimum buffer size = 640 bytes
each byte represents 1 pixel
byte values will range from 0 to 255
these are indexes into the palette
I0, I1, I2, ... , I639
Palette: yes (see note below)
components = 3
indexed_color = 1
3) True color:
minimum buffer size = 640*3 bytes
every 3 bytes represents 1 pixel (RGB order)
byte values will range from 0 to 255
R0 G0 B0, R1 G1 B1, R2 G2 B2, ... , R639, G639, B639
Palette: none
components = 3
indexed_color = 0
Palette layout:
A palette is always 24-bit RGB (in that order). Since a structure in 'C'
is word aligned a filler byte follows each entry, thus they are really stored
as RGBx (4 bytes). Where 'x' is a filler byte. Byte values will range from 0 to
255. They are stored like so:
R0 G0 B0 x0, R1 G1 B1 x1, R2 G2 B2 x2, ... , R255, G255, B255, x255
Since 'planes' can't be trusted (see below) it's best to use the entire
palette. No way of knowing if there's 16 colors or 32 colors, etc.
Palette information will have to be converted from 0-255 to 0-1000 if working
with VDI calls.
Saving overview
When saving images the image module expects the image data in full 24-bit.
Each scan line is processed one at a time. The buffer should be calculated like
so: bufsize%=width*3
Pixel data is always sent left to right.
For the sake of clarity lets say we have a sample image:
Sample in this case is 320x200
minimum buffer size = 320*3
every 3 bytes represents 1 pixel (RGB order)
byte values will range from 0 to 255
R0 G0 B0, R1 G1 B1, R2 G2 B2, ... , R319, G319, B319
There's no palette since the scan line itself is direct color.
Image info structure
Image modules communicate with the caller via an img_info structure. It's
passed to various image module subroutines. The image module will then alter
the fields of the structure. The structure should be wiped clean (zeroed)
before use.
Which img_info structure fields should be used to determine the data format?
(marked with an '*')
Field Description
------------------- -----------------------------------------------------------
width width in pixels
height height in pixels
components* number of RGB components, 1 or 3 (1=monochrome)
planes 1,2,4,8,15,16,24,32 informational use only!
colors calculated colors, informational use only!
orientation set if image module requests image to be flipped top to bottom
0=ok as is 1=image is upside down
page frame count, used by multipage documents or animations
delay frame delay in 200th of a second, for animations
num_comments 0 if no comments (exif data)
max_comments_length longest comment line (exif data)
indexed_color* set if image has a palette
0=no 1=yes
palette valid if indexed_color is set, always 24-bit RGB
space for 256 colors regardless if it uses less
background_color color seen in window if image smaller than window work area
thumbnail never seen an image module that uses this (passed in)
page_wanted frame to load, always 0 for images (passed in)
also used for loading animations
info string describing image format
max 39 chars, null terminated
more max 39 chars, null terminated
compression string describing compression method
max 29 chars, null terminated
real_width same as width, never see thumbnails used, can be ignore
real_height same as height, never see thumbnails used, can be ignore
The proper way to determine the image data format:
IF components=1
' monochrome
ELSE
IF indexed_color
' color mapped
ELSE
' true color
ENDIF
ENDIF
Never rely on fields 'planes' or 'colors'. These fields are provided for
informational use only. They describe the content of the orignal file, not the
layout of the image data the image module is sending. Relying on these will
cause failure.
For further reading see zview_m.h included with this archive.
Note: Some fields have been added or modified from the original zview.h.
Using the image modules
First thing you must do is locate the image modules. They should by default
reside in at c:\gemsys\imgmod\. Check environment variable IMG_MOD_PATH= first
to see if the user has requested a custom path. If that's not set it's safe to
assume the default path c:\gemsys\imgmod\".
Default location of image modules: c:\gemsys\imgmod\
The full path would be something like: c:\gemsys\imgmod\degas.im
Loading an image module:
bp%=pexec(path,3,null,null) !3 = load, but don't go
~mfree(long{bp%+44}) !free the env ram, not needed
~ssystem(22,bp%,-1) !flush caches for just incase
~mshrink(bp%,256+LONG{bp%+12}+LONG{bp%+20}+LONG{bp%+28}) !shrink to basepage values
bp% is the basepage of the image module, it's used to reference a specific
image module once loaded. If bp%<=0 something when wrong.
Fetch the pointer to the function table:
getfnctab%=LONG{bp%+&H8} !calc entry point of main()
fnctab%=C:getfnctab%() !get pointer to function table
' get the entry points of all functions
plugin_init%=LONG{ptr%+28} !required
libshare_exit%=LONG{ptr%+32} !optional
'
reader_init%=LONG{ptr%+36} !for loading
reader_read%=LONG{ptr%+40}
reader_quit%=LONG{ptr%+44}
reader_gtxt%=LONG{ptr%+48}
'
encoder_init%=LONG{ptr%+52} !for saving
encoder_write%=LONG{ptr%+56}
encoder_quit%=LONG{ptr%+60}
encoder_option%=LONG{ptr%+64} !optional
These are available if the image module supports saving images:
encoder_init%
encoder_write%
encoder_quit%
This is only available with specific image modules:
encoder_option%
These should be called in a specific order.
To unload an image module:
~MFREE(bp%)
If you want to keep multiple image modules resident don't close them until you
are done with all of them. You will have to keep track of multiple image
modules. It's easy to write wrappers for loading and unloading the image
modules: mod_open() and mod_close()
The function table:
FNC_INFOS fnctab = {
INFO_ID, /* +0 'GB32' */
INFO_VERSION, /* +4 plugin version 0x0100 -> 1.00*/
INFO_FLAGS, /* +6 bit field, see below */
INFO_EXTENSIONS, /* +8 list of file extensions */
INFO_FORMAT, /* +12 plugin format */
INFO_AUTHOR, /* +16 author name */
INFO_MISC, /* +20 misc extra info */
INFO_TIMESTAMP, /* +24 build data */
init, /* +28 plugin_init */
0L, /* +32 libshare_exit (optional) */
reader_init, /* +36 reader_init */
reader_read, /* +40 reader_read */
reader_quit, /* +44 reader_quit */
reader_get_txt, /* +48 reader_get_txt */
encoder_init, /* +52 encoder_init */
encoder_write, /* +56 encoder_write */
encoder_quit, /* +60 encoder_quit */
0L /* +64 encoder_option (optional) */
};
INFO_FLAGS:
Bit Meaning
--- --------------------------------------
0 true if decoder
1 true if encoder
2 true if encoder options
3 true if GCC/false if Pure C (compiler)
4 - 15 unused, should be false
Overview of image module functions
The image modules provide four main subroutines for loading images. They are:
plugin_init Allows the image module to initialize itself
Must be called 1st
Input: none
Output: none
Return value: none (void)
Call: ~C:plugin_init%()
reader_init Opens the file and gathers information about the image
Must be called after plugin_init
Input: path to image file, img_info structure
set thumbnail
Output: img_info structure, populates structure, see above
Return value: 0=ok <>0=failed
Call: status&=C:reader_init%(L:V:img$,L:img_inf%)
img$ must be null terminated
reader_read Loads each scan line one by one, example:
Reports height of 480, it must be called exactly 480 times
If called one to many times, expect strange behavior
Input: img_info structure, scan line buffer address
set page_wanted
Output: fills the scan line buffer with image data
Return value: 0=ok <>0=failed
Call: status&=C:reader_read%(L:img_inf%,L:scan_line_buf%)
reader_quit Tells the image module to free all it's resources
Doesn't unload the image module
Input: img_info structure
Output: none
Return value: 0=ok <>0=failed
Call: status&=C:reader_quit%(L:img_inf%)
reader_gtxt Fetch comments (exif data)
Should be called just before closing the file
Input: img_info structure, structure comments
Output: fills the structure with comments
Return value: none (void)
Call: ~C:reader_get_txt%(L:img_inf%,L:exif%)
If an image module supports saving there's thee more subroutines:
encoder_init Creates the image file and begins the saving process
Must be called after plugin_init
Input: path to image file, img_info structure
set width/height
Output: img_info structure, populates structure, see above
Return value: 0=ok <>0=failed
Call: status&=C:encoder_init%(L:V:img$,L:img_inf%)
img$ must be null terminated
Note: If null the image module doens't support saving
encoder_write Write each scan line one by one, example:
If you have 480 scan lines it must be called exactly 480 times
Input: img_info structure, scan line buffer address
scan line data
Output: none
Return value: 0=ok <>0=failed
Call: status&=encoder_write(L:img_inf%,L:buffer%)
encoder_quit Close image file and free all resources
Doesn't unload the image module
Input: img_info structure
Output: none
Return value: 0=ok <>0=failed
Call: stat&=C:encoder_quit%(L:img_inf%)
The JPGE/TIFF image modules provide options via these extra subroutines:
Note: These are the only image modules that provide extra options.
jpg_option Set jpeg options (*=default if not called)
Input: quality: 1-100 (90*)
color space: 1=Grayscale 3=RGB*
progressive flag: 0=No* 1=Yes
Output: none
Return value: none (void)
Call ~C:jpg_option%(L:quality%,L:color_space%,L:progressive%)
tiff_option Set tiff options (*=default if not called)
quality: 1-100 (75*)
compression: 1=None 5=LZW* 7=JPG-DCT 32773=Mac-RLE 32946=Deflate
Output: none
Return value: none (void)
Call ~C:tiff_option%(L:quality%,L:compression%)
General program overview
For loading:
Load the desired image module -> status&=@mod_load()
Call the plugin_init() routine of the image module (required)
Create the img_info structure (reader_init() will update the structure)
Set thumbnail option, usually 0
Call reader_init() to gather information about the desired image
See above for a list of usable structure fields
If the orientation flag is set the image needs to be flipped
Set page_wanted to 0 (images have only 1 frame)
Call reader_read() exactly once for each scan line
You will have to decide how to process the scan line data
Call libsahre_exit (optional)
Call reader_quit() to free the image module resources
Unload the image module -> status&=@mod_close()
For saving:
Load the desired image module -> status&=@mod_load()
Call the plugin_init() routine of the image module (required)
Call xxx_option functions if needed
Create the img_info structure (encoder_init() will update the structure)
Set width/height
Call encoder_init() to create desired image size
See above for a list of usable structure fields
Call encoder_read() exactly once for each scan line
Send each scan line in 24-bit
Call encoder_quit() to free the image module resources
Unload the image module -> status&=@mod_close()
Error handling
The image modules directly return usable error codes. Zero (0) is considered
ok. Values other than zero should be treated as error codes.
Example: status&=C:reader_init%(path$,img_info%)
IF status&<>0 !file was rejected?
errtext$=@err_to_txt$(status&) !convert to human readable text
ENDIF
These functions return error codes:
reader_init, reader_read, reader_quit
encoder_init, encoder_write, encoder_quit
Packaged along with the image modules is a 'C' header file (EC_ERROR.H) with a
list of defines covering all possible error codes. It's up to the caller to
translate the error code into human readable form and display it. It's done
this way to keep the size of the image module to a minimum.
Contents of file EC_ERROR.H:
/* error codes for all codecs, returned via c:fnc() */
/* note: 2 to 9 are not used, we start at 10 */
/* if negative it's a standard gemdos error code */
/* if positive it's related the content of the file */
/* standard gemdos error codes, these are just here for my reference */
/* codecs return gemdos error codes where it makes sense */
#define EC_Fwrite -10 /* fwrite failed, size in/out didn't match, or negative error code */
#define EC_Fread -11 /* fread failed, size in/out didn't match, or negative error code */
#define EC_Fopen -33 /* fopen failed, image file not found */
#define EC_Fcreate -36 /* fcreate failed */
#define EC_Fclose -37 /* fclose failed */
#define EC_Malloc -39 /* malloc failed */
#define EC_Mfree -40 /* mfree failed */
#define EC_Fseek -64 /* fseek failed, truncated file? */
/* error codes related to file content */
/* these will be used in multiple codecs and maybe new codecs in the future */
#define EC_CompType 10 /* header -> unsupported compression type */
#define EC_DecompError 11 /* error during decompression phase */
#define EC_ResolutionType 12 /* header -> unsupported mode code neo/degas */
#define EC_ImageType 13 /* header -> unsupported image type */
#define EC_PixelDepth 14 /* header -> unsupported pixel depth */
#define EC_ColorMapDepth 15 /* header -> unsupported color map depth */
#define EC_ColorMapType 16 /* header -> unsupported color map type */
#define EC_FileLength 17 /* incorrect file length */
#define EC_FileId 18 /* header -> unknown file identifier */
#define EC_HeaderLength 19 /* header -> unsupported header length */
#define EC_WidthNegative 20 /* header -> image width < 0 */
#define EC_HeightNegative 21 /* header -> image height < 0 */
#define EC_InternalError 22 /* non-specific, subfunction failure: png/gif */
#define EC_ColorSpace 23 /* header -> unsupported color space */
#define EC_ColorMapLength 24 /* header -> unsupported color map length */
#define EC_MaskType 25 /* header -> unsupported mask type */
#define EC_ChunkId 26 /* unsupported chunk identifier: iff */
#define EC_FileType 27 /* received wrong file type */
#define EC_FrameCount 28 /* frame count exceeds limit */
#define EC_ColorCount 29 /* header -> unsupported color count */
#define EC_BitmapLength 30 /* header -> calc'd length doesn't match */
#define EC_HeaderVersion 31 /* header -> unsupported version */
#define EC_HeightSmall 32 /* header -> unsupported height, to small: fnt */
#define EC_CompLength 33 /* header -> incorrect compressed size: spx */
#define EC_FrameType 34 /* header -> unsupported frame type: seq */
#define EC_RequiresNVDI 35 /* NVDI not installed */
#define EC_FuncNotDefined 36 /* function not implemented */
/* new as of 12/18/2021 */
#define EC_StructLength 37 /* incorrect structure length */
#define EC_RequiresJPD 38 /* JPEGD DSP decoder not installed */
#define EC_OpenDriverJPD 39 /* JPEGD OpenDriver() failed */
#define EC_GetImageInfoJPD 40 /* JPEGD GetImageInfo() failed */
#define EC_GetImageSizeJPD 41 /* JPEGD GetImageSize() failed */
#define EC_DecodeImageJPD 42 /* JPEGD DecodeImage() failed */
#define EC_OrientationBad 43 /* orientation unsupported */
/* new error codes will be added to the end of this list as needed */
/*
status=c:reader_init(path$,imageinfo)
if status=false !file rejected?
' we let jpg/tiff pass through
print @err_to_txt$(imageinfo->thumbnail) !find out why
endif
function err_to_txt$(err_code) !note jpg and tiff work the old way
' maybe format as alert strings, etc.
local msg$
select err_code
case ec_fopen
msg$="file not found"
case ec_fread
msg$="premature end of file"
case ec_fclose
msg$="disk full or locked"
case ec_resolutiontype to ec_colormaptype
msg$="unsuported image format"
default !end up here if not found (0 or 1, tiff and jpg)
msg$="general failure" !generic error msg
endselect
return msg$
endfunc
*/
GFA-Basic source code
For further assistance see im_load.lst and im_save.lst source listings.
I used ABSOLUTE to make things a bit easier since I'm only ever working with
a single image module. Pointer operations like {img_info%+offset&} could also
be used, whatever floats your boat. ;o)
INLINE imginf_%,1192
BZERO imginf_%,1192
' setup direct read/write access to the structure (1192 bytes)
ABSOLUTE ii_width&,imginfo_%+0 !image width in pixels
ABSOLUTE ii_height&,imginfo_%+2 !image height in pixels
ABSOLUTE ii_components&,imginfo_%+4 !* 1=mono 3=color mapped or true-color
ABSOLUTE ii_planes&,imginfo_%+6 !info only, can't rely on it
ABSOLUTE ii_colors%,imginfo_%+8 !info only, can't rely on it
ABSOLUTE ii_orientation&,imginfo_%+12 !0=normal 1=needs flipped
ABSOLUTE ii_page&,imginfo_%+14 !number of pages/frames in the file
ABSOLUTE ii_delay&,imginfo_%+16 !used for animations
ABSOLUTE ii_num_comments&,imginfo_%+18 !comments extracted from the image file
ABSOLUTE ii_max_comments_length&,imginfo_%+20 !length in byte of the largest comment extracted
ABSOLUTE ii_indexed_color&,imginfo_%+22 !* 0=mono or true-coloe 1=color mapped
ABSOLUTE ii_memory_alloc&,imginfo_%+24 !internal use
ii_palette%=imginfo_%+26 !padded to 4 bytes, 'rgb0', thus 256*4 bytes total
ABSOLUTE ii_background_color%,imginfo_%+1050 !as a long '0rgb'
ABSOLUTE ii_thumbnail&,imginfo_%+1054 !0=no 1=yes (infomational only)
ABSOLUTE ii_page_wanted&,imginfo_%+1056 !request this page, 0 to ?
ii_info%=imginfo_%+1058 !null terminated text
ii_more%=imginfo_%+1098 !null terminated text
ii_compression%=imginfo_%+1138 !null terminated text
ABSOLUTE ii_real_width&,imginfo_%+1168
ABSOLUTE ii_real_height&,imginfo_%+1170
' beyond this point is private stuff used by the image modules
'
' locate the image module folder
~SHEL_ENVRN(addr%,"IMG_MOD_PATH=") !request env var
'
IF addr% !user set custum path?
im_path$=TRIM$(CHAR{addr%})
IF RIGHT$(im_path$)<>"\" !missing backslash?
im_path$=im_path$+"\"
ENDIF
ELSE !default path if no env var
im_path$="c:\gemsys\imgmod\"
ENDIF
Dithering
Dithering can be achieved three ways:
1) NVDI v5.03 -> vr_transfer_bits(), tested and works.
2) Try using screen.ldg from the LDG website, untested.
3) Roll your own dithering, good luck.
Note: Only NVDI v5.03 dithers correctly, lesser versions are all bugged.
Loading animations
Loading animations is similar to loading an image. The difference is you take
field entry page (number of frames) and load exactly that many images. For each
frame requested page_wanted is increased. You have to convert and store all the
frames. Each frame has it's own delay and these will need to be stored as well.
After all frames are loaded play them back in a loop using the delays.
Function reader_gtxt is used to extract exif data (if any) from an image file.
A special structure is needed to do this. It's layout is as follows:
2 words followed by a list of longs (pointers to strings max_length& bytes)
[line_count&][max_length&][pointer_1%][pointer_2%][pointer_3%][pointer...]
| | |
| | \_max_length& bytes
| \_max_length& bytes
\_max_length& bytes
When called the function will fill in the structure. The strings will be null
terminated and may contain characters >127. Example: If the img_info structure
reports 3 comments, max length 38, the required structure size would be:
2+2+(3*4)+(3*(38+1))
| | |
| | \_3 strings
| \_3 pointers
\_2 words
Another way to visualize the example:
[line_count&]
[max_length&]
[pointer_to_string_1%] -> [39 bytes]
[pointer_to_string_2%] -> [39 bytes]
[pointer_to_string_3%] -> [39 bytes]
The image file contains exif data if num_comments > 0 and then
max_comments_lenght contains the largest string size in bytes. Does not include
the null terminator. Function reader_gtext should be called just before
reader_quit.
Misc notes
Just some stuff I put here so I don't forget it.
You can't trust 'planes'. The proof is in zView's own source code archive.
See godldg.c where it sets planes to 16, but transforms the image data
to 24-bit before sending it to zView.
In tgaldg.c planes is set to match the tga header and then 15/16-bit images are
again converted to 24-bit before being sent to zView.
Quite a few image modules were written by me. They are created with Pure C.
Unfortunately GFA-Basic can't be used to create them.
GEM-View plugins are a mixture of 'C' and assembler and harder to create. The
plugin documentation is all in German. Partly why I decided to create zView
style plugins.
GEM Metafile
GEMMETA.APP -> FireBee
GEMMETA.PRG -> All 68k machines
Planes Mode interpretation Notes
---------- -------------------------------- ----------------------------
1 to 8-bit indexed color best results
15-bit XRRRRRGGGGGBBBBB
16-bit RRRRRGGGGGGBBBBB Falcon030
24-bit RRRRRRRRGGGGGGGGBBBBBBBB
32-bit AAAAAAAARRRRRRRRGGGGGGGGBBBBBBBB
While in high-color or true-color modes, the conversion assumes the screen is
laid out per Atari's specifications. 100% VDI calls are used to render the
images, if the colors look totally wrong, blame the video card.
If an image doesn't look correct in high-color or true-color, try 256 color
mode.
The current color palette is assumed and used since color information is not
contained in GEM metafiles.
Images will be scaled to the screen height and the width adjust such that the
image remains perportional to it's original aspect ratio.
Loading is somewhat slow since it relies entirely on VDI calls.
Requires NVDI as it uses off-screen bitmaps.
Metafiles from PC\GEM (GEM Draw for example) should load without problems.
COMPEYES
ComputerEyes (raw format)
This format is not documented in the CE.PRG manual. You must hold down the
Alternate key while clicking Load/Save in the drop-down menu.
CE1 - 320x200 6-bits per RGB, thus 18-bit, 262144 colors
CE2 - 640x200 5-bits per RGB, thus 15-bit, 32768 colors
CE3 - 640x400 6-bit grayscale, thus 64 shades of gray
Note: PicSwitch v1 also had an documented feature as it can load these files.
PCL
Printer Control Language
This codec outputs PCL level 5 raw files. These can be sent directly to a PCL
capable printer, or post processed into other formats like PDF.
Quality is fixed at 300 dots per inch.
Notes: Hold the ALternate key down while saving to output landscape
orientation.
This codec does not read PCL files. They will be ignored.
FLIC
Autodesk Animator (animations)
Animation speed may incorrect.
It may not play all FLIC files correctly.
Tested mostly with files created by Apex Media.
FLX, FLT probably won't work as they use more advanced compression which
isn't supported.
PRO89XX
Print-Technik Realtizer
128 level gray scale images, no compression
PNTSHOP
PaintShop plus
Always monochrome images.
*.PSC -> 640x400 compressed
*.DA4 -> 640x800 uncompressed
ANIMASTR
Animaster (sprite bank)
Always ST low
Note: Will also load *.MSK files.
IMAGELAB
ImageLab
256 level gray scale images
PAINTPRO
PaintPro ST/PlusPaint ST
standard double
ST low 320x200 320x400
ST medium 640x200 640x400
ST high 640x400 640x800
PSX
PlayStation
Supports:
4-bit 16 colors
8-bit 256 colors
15-bit high-color
24-bit true-color
Note: If the image file contains more than one palette, only the first palette
will be used.
SIGNUM
Signum! (image)
Always compressed ST high
Note: Depacks Signum! v2 files, might work on later versions, untested.
IMAGIC
Imagic (images)
Supports:
ST Low
ST Medim
ST High
Note: Animation files not supported.
CEL
Cyber Paint (clip images)
CEL -> Always ST Low, 16 colors, 320x200 or less
SEQ
Cyber Paint (animations)
SEQ -> Always ST Low, 16 colors, 320x200
CYBRMATE
Cybermate delta animamtions
320x200, 16 colors, ST Low
640x200 4 colors, ST Medium
640x400 2 colors, ST High
If the 1st frame is missing (Degas image) from the same path, then loading is
aborted.
It supports compressed and uncomressed degas images.
Loads a maximum of 1024 frames.
ANIMATIC
Animatic (Film files)
These are animated images in ST ST Low screen format
Minimum size 8x8
Maximim size 48x48
Codec supports:
Standard looping
Ping-Pong looping
Reverse direction looping
Not supported, pausing or animation stop
MEGAPNT
MegaPaint
BLD files are aways monochrome 1440x1856x1
compressed files tested
uncompressed files untested
RAGD
Rag-D (Risk Aided Graphics Design)
Supports all Falcon030 modes, always uncompressed.
CALAMUS
Calamus (Raster Graphic)
These are always monochrome, w/h may vary.
PBLCPNTR
Public Painter
Always monochrome and compressed
Size A5: 640x400
Size A4: 640x800
PICWORKS
Picworks
CP3 -> Only loads monochome images 640x400x1 for now
CP3 depacking based on Picworks v1.1
Can't find a copy of Picworks v2.0
DESKPIC
DeskPic background image
Supports:
2 colors (monochrome)
4 colors
16 colors
256 colors
Standard ST/TT bitmaps
PNTWORKS
Paintworks (aka N-Vision)
Ext Mode Rez
--- ---- -------
CL0 low 320x200
CL1 med 640x200
CL2 high 640x400
PG0 low 320x400
PG1 med 640x400
PG2 high 640x800
SC0 low 320x200
SC1 med 640x200
SC2 high 640x400
CLx = clipboard file
PGx = page file
SCx = screen file
PTx = pattern file (not supported at all)
Caps Lock Off Medium resolution original size
On Medium resolution 640x400 (correct aspect ration)
Graphics Processor
ST low, medium, and high
Supports compressed files.
ASCII
Default color scheme is Black on White.
Hold alternate down while loading to get White on Black instead.
COLR
C.O.L.R. Object Editor
If *.PAL is found in the same directory it's assumed to be the palette.
If no palette file is found, grayscale is assumed.
IFF
Interchange File Format (IFF)
IFF.APP -> FireBee
IFF.PRG -> All 68k machines
If used on MiNT u:\ram\ will be used to write a temporary file, otherwise
folder c:\clipbrd\ needs to exist.
Supported image types:
ILBM - standard (1 to 8, 15, 16, 21, 24 planes)
DILBM - dynamic ilbm (4 planes only)
RILBM - raster ilbm (4 planes only, NEOchrome Master)
EHC - extra-halfbrite (6 planes)
HAM6 - hold-and-modify (6 planes)
DHAM6 - dynamic hold-and-modify (6 planes)
HAM8 - hold-and modify (8 planes)
SHAM - sliced HAM (6 planes)
CTBL - dynamic HAM (6 planes)
ACBM - amiga continous bitmap (1 to 8 planes only)
PBM - planar bitmap (8 planes only)
DEEP - HC/TC variant (24/32 planes)
REG - Black Belt Systems
HAM-E - Black Belt Systems
Dynamic chunk support: BEAM CTBL DYCP PCHG
Converts IFF 'ANNO' block into exif data.
Uncompressed, RLE, and VDAT (Atari ST)
Note: Degas block files are actually IFF files.
The HAM-E and REG images will have blank scan lines at the top and this
is normal. The HAM-E format stores special information in the first few
scan lines so they are blanked on purpse otherwise it looks like garbage.
IFFDCTV
Amiga DCTV images
These are IFF files with the bitmap encoded a special way. They are so
complicated it's a codec in itself. They should be renamed to *.dct before
trying to load them.
Supports 2-bit DCTV images (non-standard).
Supports 3 or 4-bit DCTV images.
Converts IFF 'ANNO' chunk into exif data.
IFFRGBN
Amiga Turbo Silver (Impulse)
These need to be renamed *.TSI as the amiga has no consistant naming scheme.
Supports:
RGBN -> 12-bit RGB
RGB8 -> 24-bit true-color
Converts IFF 'ANNO' chunk into exif data.
Note: Only compressed images are supported.
EZARTPRO
EZ-Art Professional
EZA -> 320x200 - 16 color (st low, compressed)
EZ4 -> ? (unsupported)
EZ5 -> ? (unsupported)
PNM
Portable Bit Map
Loads monochrome, binary or text
Loads grayscale, binary or text
Loads TC, binary or text
PAM files are not supported.
PICPACKR
The Picture Packer, Jeff Prieb, STfx Software
ST low
ST medium
ST high
Always compressed (STOS MBK minus the header)
PRISMPNT
Prism Paint, True Paint
1-bit mono
2-bit color
4-bit color
8-bit color
16-bit high-color (RGB565) *
24-bit true-color *
RLE compressed or not.
* = untested
DOODLE
Dr. Doodle images can be ST low, medium, or high.
There's no resolution info in the file itself.
The codec tries to auto detect the resolution.
The resolution detection can be forced, hold down one of the following keys:
Left-Shift -> High
Control -> Medium
Alternate -> Low
Note: There is no color info in the file, so a default ST palette is used.
INSHAPE
InShape Raytracing Software
Supports:
1-bit mono
8-bit grayscale
24-bit true-color
32-bit true-color with alpha
Not supported:
4-bit color
8-bit color
STAD
ST Aided Design
STAD images are always 640x400 monochrome.
SPEC512
Spectrum 512
Loads:
ST palette: standard, 3 bits
STE palette: standard, 4 bits
STE palette: enhanced, 5 bits (auto-detected)
Holding the Alternate key down when loading forces an ST/STE standard palette,
this way you can see the difference between standard and enhanced.
PCHROME
PhotoChrome images are awlays 320x200.
Loads single image or dual image files.
SPECX
Spectrum 512 Extended
320x???
These are Spectrum 512 images stacked on top of each other to produce a
larger image.
Loads compressed or uncompressed files.
Note: Will not load files that are pre-packed as a whole.
ART
Art Director, Palette Master, GFA Artist, The ArtiST
Art Director images are always 320x200 in 16 colors.
Palette Master images are 320x200,
with a 16 color palette for every 2 scan lines.
GFA Artist images are always 320x200,
they claim 1000 colors using 69 palettes,
theres also a simple 16 color format
The ArtiST images are always 640x400 monochrome.
GFARTFNT
GFA Artist Font
Only the first 160 characters are defined.
Each character is 16x16 pixels.
MACPAINT
MacPaint images are always 576x720 monochrome.
Skips mac file header if detected.
POFOIMG
Atari Portfolio Graphics images are always 240x64 monochrome.
POFOANI
Atari Portfolio Animations are always 240x64 monochrome.
Maximum of 1024 frames. PGT frames are skipped.
Wait for keypress option not supported by zView, simulated by 10 second delay.
The overall timing might be slightly off.
GFARTIMG
GFA Raytrace (Image files)
Color images are always 320x200, 320x100, 320x50, or 320x25.
Monochrome images are always, 640x400, 640x200, 640x100, or 640x50.
Reads compressed or uncompressed files.
STE palette supported.
GFARTANI
GFA Raytrace (Animation files)
SAL -> ST Low
SAH -> ST High
Animations ping-pong loop by default, hold down the Alternate key while
loading for standard looping.
Speed is estimated and may be incorrect.
REMBRNDT
Rembrandt True Color Picture
Falcon030 16-bit high-color, no compression
PNG
Portable Network Graphics
LibPNG: 1.6.37, zLib: 1.2.11
TINY
Tiny Stuff
Loads ST low, medium, and high Tiny images.
Tiny images are always RLE compressed.
TN4 -> ST Low with color cycling animation
TN5 -> ST Medium with color cycling animation
TN6 -> ST High with color cycling animation
CRACKART
CrackArt
Loads ST low, medium, and high images.
Reads compressed or uncompressed files.
Note: A program called "Grafix Art" writes *.GRX file. These are really *.CA1
files. Just rename them and they can be loaded.
TARGA
Truevision Targa
Loads the following:
Type 1/9 color mapped 8-bit
Type 2/10 high/true color 15, 16, 24, 32-bit
Type 3/11 monochrome/grayscale 8-bit
RLE compressed or not. Loads all four orientations.
Only saves Type 2 format.
FTC
Falcon True Color
Always , 16-bit per pixel, uncompressed
Resolution File Size
---------- ---------
320x200 128000
320x240 153600
384x240 184320
320x480 307200
384x480 368640
384x576 442368
640x480 614400
768x480 737280
768x576 884736
384x619 475392
PIXART
PixArt
Planar: 1, 2, 4, 8 planes
Chunky: 2, 4, 8, 16, 24, 32 planes
QPAINT
QuantumPaint (Box)
Loads the following:
Low 320x200 - 128 colors
Low 320x200 - 512/4096 colors
Medium 640x200 - 32 colors (up-scaled to 640x400)
Compressed or uncompressed.
EGGPAINT
EggPaint/Spooky Sprites
Images are always Falcon030 16-bit high color.
Note: Does not load ICE packed files.
SPOOKY
Spooky Sprites
Falcon high-color, uncompressed
INDYPNT
IndyPaint
Images are always Falcon030 16-bit high color.
NEOIMG
NEOchrome images are usually 320x200 in 16 colors.
NEOchrome v0.9h can create image files that are 640x400 in 16 colors.
Part of the Atari 7800 developers kit.
NEOchrome Master (Raster) images are 320x200, but each scan line has it's
own palette. If file *.RST is found in the same directory, the raster image
will be decoded in full color.
NEOANI
NEOchrome (Animation files)
These's have no palette stored in the files, grayscale is used by default.
If the codecs finds *.neo of the same name in the same path, it will load
the palette from the image file.
Speed is estimated and may be incorrect.
Alternate key -> Hold when loading to reverse aniamtion direction
Caps Lock key -> Force ping-pong looping
NOTE: To get this feature on versions 0.9 and later select the Grabber
icon and click both mouse buttons in the eye of the second R in the
word GRABBER.
Interestingly enough, some versions of NEO only require you
to press the right button, not both.
IMGSCAN
IMG Scan (Seymor-Radix)
Images are always 256 shades of gray.
Image support:
Res Size Ext
320x200 64000 *.RWL
640x200 128000 *.RWM
640x400 256000 *.RWH
IMG Scan v1.84 changed the file extension to *.RAW. They should be renamed
as above in order to be correctly loaded.
ESM
Enhanced Simplex
Supports:
1-bit mono
8-bit color mapped (256 colors)
24-bit true-color
DUNGRAPH
DuneGraph images are always 256 colors.
Loads packing method:
0 (uncompressed)
1 RLE byte
2 RLE word
3 RLE long
CANVAS
Canvas images are standard ST low, medium, or high.
There's also a special HBL mode with extra colors (Low and medium only).
HBL supported:
Canvas saves the extra colors in an HBL file. If an *.HBL file is found with
the same base name, then it will be loaded in HBL format. Canvas can change
the palette every 4 scan lines, thus 50 palettes can be displayed at once.
Hold down the Alternate key to load the image without the HBL file.
Will also load *.FUL files. These are CPT + HBL files all in one.
RLE compressed or uncompressed.
Note: CNV files have no palette. The resolution can be force, see DOODLE.
DELMPNT
DelmPaint images are always 256 colors
*.del -> 320x200 or 320x240
*.dph -> 640x400 or 640x480
COKE
COKE format
Images are always Falcon030 16-bit high color.
FULLSHOW
FULLSHOW (Fullscreen Construction Kit) images are always 16 colors.
Image support:
Ext Resolution Size
--- ---------- -----
kid 460x274 63054 (see note)
kil 456x270 62506 (see note)
kit 448x270 61410
Note:
The 460 and 456 wide images are not evenly divisible by 16 and so the last 16
pixels of each scan line may look incorrect. These are clipped to 448 pixels
wide. To see the full image hold the Alternate key down when loading.
DEGASX
Degas Extended images: (Xbios7 style palette)
PI4 -> 320x480 256 colors
PI5 -> 640x480 16 colors
PI6 -> 1280x960 2 colors
FuckPaint images: (Falcon style RGB palete)
PI9 -> 320x200 256 colors
PI4 -> 320x240 256 colors
PI7 -> 640x480 256 colors (very similar file layout)
Both image formats are uncompressed.
CLRBURST
ColorBurst II
Images are low or medium resolution only.
Each scan line has it's own 16 color palette, thus 200 palettes.
The images are always RLE compressed.
Note: Currently only type 10 images from ColorBurst II v1.2 are supported.
Type 20 images from ColorBurst II v1.3 are not supported.
RGB
RGB Intermediate Format
Images are always 320x200
Support 12-bits of color resolution, always uncompressed.
DEGAS
Degas/Degas Elite
ST Low 320x200 16 colors
ST Medium 640x200 4 colors
ST High 640x400 2 colors
These are identified by file size:
ST Low 320x240 16 colors (overscan) 38434
ST Low 320x280 16 colors (overscan) 44834
ST Low 416x560 16 colors (overscan) 116514
Loads compressed or uncompressed files.
Caps Lock Off Medium resolution original size
On Medium resolution 640x400 (correct aspect ration)
ZZROUGH
ZZ_ROUGH
Images are alaways ST low resolution 320x200 in 16 colors, compressed.
GODPAINT
GodPaint
Images are always Falcon030 16-bit high-color, uncompressed.
SYNARTS
Synthetic Arts v1.0
SRT -> Alywats ST Medium 640x200 in 4 colors.
BIT -> Raw screen dump, no palette information.
Note: BIT files have no palette. The resolution can be forced, see DOODLE.
DALI
Dali images are stanard ST resolutions.
Low Medium High
SD0 SD1 SD2 (uncompressed)
LPK MPK HPK (RLE compressed)
PABLOPNT
Pablo Paint
PPP -> ST low
PA3 -> ST high
Compressed or uncompressed.
MSPAINT
Microsoft Paint
Images are always monochrome, RLE compressed or uncompressed.
MPP
Multi Palette Picture
by Zerkman / Sector One
From the MPP documentation:
Pre-defined image modes
=======================
Mode 0: 320x199, CPU based, displays 54 colors per scanline
with non-uniform repartition of color change positions.
Mode 1: 320x199, CPU based, displays 48 colors per scanline
with uniform repartition of color change positions.
Mode 2: 320x199, blitter based (STE only), displays 56 colors per scanline
with uniform repartition of color change positions
Mode 3: 416x273, CPU based, displays 48+6 colors per scanline
with overscan and non-uniform repartition of color changes.
FUNNYPNT
Funny Paint
Supports:
1-bit -> mono
2-bit -> 4 colors
4-bit -> 16 colors
8-bit -> 256 colors
16-bit -> 65536 colors (Falcon030 high-color)
Supports animated files.
BMP
Windows Bitmap v2, v3, v3 (NT), v4, v5
OS/2 Bitmap v1, v2
1-bit mono (uncompressed only)
2-bit color Windows CE
4-bit color RLE4
8-bit color RLE8
16-bit color RGB555 or RGB565
24-bit color RLE24
32-bit color ARGB
Not supported: OS/2 Huffman 1D compression (mono)
Windows JPEG/PNG
PCX
PC Paintbrush
Supported image types:
CGA 1-bit mono (B&W)
CGA 2-bit (4 colors)
EGA 3-bit (8 colors)
EGA/VGA 4-bit (16 colors)
VGA 8-bit color/grayscale (256 colors)
VGA/XGA 24-bit true color
Unsupported image types:
VGA/XGA 32-bit true color
SSB
Slideshow Sinbad
Images are always ST low, 320x200, 16 colors.
Note: Will not load ICE packed files.
SUN
Sun Raster file support:
1-bit monochrome
4-bit color
8-bit color or grayscale
24-bit TC
32-bit TC
RLE compressed or not.
PCI
Overscan Interlaced
These images come from the demos:
Tobias Richter Fullscreen Slideshow (ST)
Tobias Richter Fullscreen Slideshow (STe)
They are always 352x278
Note: Won't load ICE packed files directly.
DGRAPH
D-GRAPH (v0.4)
240 color, 320x200
Two alternating screens with the same palette.
ARABESQUE
Monochrome only drawing program.
Loads 3 format variants: 8a, 8b, and 9a
Note: Does not load uncompressed *.PUF files as they do not have a header.
DUO
DUO DU1 DU2
Format by Anders Eriksson
416x273 ST low
832x273 ST medium
Experimental codec
PL4
PL4
Foramt by Sascha Springer
320x200
Experimental codec
HRM
HighResMode
These images come from the demo: "HighResMode" by Paradox
From the read me file:
Each picture has a resolution of 640x400 and can contain up to 14,000 colors
out of a palette from 29,791 colors. It is very hard to convert 24Bit pictures
to this mode so you will still see some small color bugs in the pictures.
Note: Won't load ICE packed files directly.
GEMIMG
GEM Bitmap
1-bit mono
2-bit color
4-bit color
8-bit color
16-bit high-color
24-bit true-color
32-bit true-color
Header types:
nosig -> assumed to be standard (usually monochrome)
16 color
256 color gray scale
XIMG -> RGB type only
STTT -> color
0x80 -> HyperPaint
0x09 -> Ventura Publisher (16 color/256 grayscale)
24-bit true color
TIMG -> not supported
Note: If an image has no palette, then greyscale is used.
FNT
Degas Font
2048 or 2050 bytes, 256x64 mono
Warp9 Font
4096 or 4098 bytes, 256x128 mono
GDOS Font
Shows font name, ?x? mono
Cubase Font -> GDOS Font
Always 2048x16 mono
GIF
Graphics Interchange Format
GIFLIB: 5.1.1
EUREKA
Eureka RAW format
Unknown origin.
TIFF
Tag Image File Format (LibTIFF v4.0.10)
JPEG
Joint Photographic Experts Group (LibJPEG v7.0)
Debug
Hold alt key while loading image:
IFF.IM
Index
A
ANIMASTR
ANIMATIC
ARABESQUE
ART
ASCII
B
BMP
C
CALAMUS
CANVAS
CEL
CLRBURST
COKE
COLR
COMPEYES
CRACKART
credits
CYBRMATE
D
DALI
Debug
Default
DEGAS
DEGASX
DELMPNT
DESKPIC
Developer's Corner
DGRAPH
Dithering
DOODLE
DUNGRAPH
DUO
E
EGGPAINT
ENCOM
Error handling
ESM
EUREKA
Extracting exif data
EZARTPRO
F
FLIC
FNT
FTC
FULLSHOW
FUNNYPNT
G
GEMIMG
GEMMETA
General program overview
GFA-Basic
GFA-Basic source code
GFARTANI
GFARTFNT
GFARTIMG
GIF
GODPAINT
H
Handling file extensions
Help
HRM
I
IFF
IFFDCTV
IFFRGBN
Image info structure
IMAGELAB
IMAGIC
IMGSCAN
index
INDYPNT
INSHAPE
Installation Instructions
Introduction
J
JPEG
JPEGDSP
L
Loading animations
Loading overview
Lonny Pursell
M
MACPAINT
Main
MEGAPNT
Misc notes
MPP
MSPAINT
N
NEOANI
NEOIMG
O
Overview of image module functions
P
PABLOPNT
paint programs
PAINTPRO
PBLCPNTR
PCHROME
PCI
PCL
PCX
PICPACKR
PICWORKS
PIXART
PL4
PNG
PNM
PNTSHOP
PNTWORKS
POFOANI
POFOIMG
PRISMPNT
PRO89XX
PSX
Q
QPAINT
R
RAGD
REMBRNDT
RGB
S
Saving overview
SEQ
SIGNUM
SPEC512
SPECX
SPOOKY
SSB
STAD
SUN
SYNARTS
T
Targa
TARGA
TIFF
TINY
U
Using the image modules
Z
ZZROUGH
eof