Mime types for ANSI graphics

Magnus Bergman magnus.bergman at observer.net
Mon Mar 6 18:20:36 EET 2006


I'm writing some (desktop-) programs to deal with ANSI graphics[1] and
related formats. And now I find my self in the need of mime-types for
these file formats. I've search and asked around a bit but didn't find
anything. So I present a brief description of the (five more important)
formats and my suggestions on mime-types. Does anybody have some
opinion or even information about this?


The word ANSI is short for American National Standards Institute and
refers to the standard ANSI X3.64. But the graphics depend on a
specific (not entirely correct) implementation: ansi.sys found on DOS
system. And also on some specific characteristics of the VGA graph
adapter (like most of the other formats too).

Extension           : ans
Suggested Mime-type : text/x-ansi


Avatar[2] is a similar encoding. But the codes are binary making the
files smaller. Strictly speaking it only first level of Avatar
(Avatar/0) which is encoded in the files in question (the next level
has codes for moving windows around and things like that).

Extension           : avt
Suggested mime-type : text/x-avatar


Another common format is bin. It is basically a binary dumb of the VGA
adapters text mode memory (0xb800:0), but larger so it can be scrolled
over the screen. This is a very stupid format since it has no header
and just a very general file extension. I bet there is a bunch of other
stuff named bin too.

Extension           : bin
Suggested mime-type : image/x-bin


To solve the shortcomings of the bin format, xbin[3] was invented. In
addition to the binary dumb it contains a header, and optionally an
alternative font and a palette.

Extension           : xb
Suggested mime-type : image/x-xbin


Remote Imaging Protocol[4] (or RIPscrip) is a set of codes, not unlike
the ANSI ones, but also supports some graphic primitives (polygons ans
such). As a protocol it used to add some graphics to the text displayed
in a terminal. But the file format is in reality used for storing
graphics (even thou it could be used to store text with just a few
layout features). So I'm not sure if it should be considered a text or
an image format, but I lean toward an image format.

Extension           : rip
Suggested mime-type : image/x-ripscrip


[1] http://en.wikipedia.org/wiki/ANSI_art
[2] http://en.wikipedia.org/wiki/AVATAR
[3] http://en.wikipedia.org/wiki/XBIN
[4] http://en.wikipedia.org/wiki/Remote_imaging_protocol



More information about the xdg mailing list