ImageGear for C and C++ on Windows v19.10 - Updated
TXT (ASCII Text)
User Guide > File Formats and Compressions > File Formats > File Formats Reference > TXT (ASCII Text)

Full Name TXT (ASCII Text)
Format ID IG_FORMAT_TXT = 41
File Extension(s) *.txt
Data Type Raster Image
Data Encoding ASCII
Color Profile Support No
Multi-Page Support Yes
Alpha Channel Support No
ImageGear Platforms Support WIN32, WIN64, Unix, Unix64, MAC

ImageGear Supported Versions:

N/A

ImageGear Supported Features:

ImageGear Read Support:

ImageGear Write Support:

No

ImageGear Filter Control Parameters:

Filter Control Parameter Type Default Value Available Values Description
XDPI UINT 200 Horizontal resolution of image.
YDPI UINT 200 Vertical resolution of image.
MARGINS_LEFT LONG 1000 Left text margin on page, expressed as thousandths of an inch.
MARGINS_TOP LONG 1000 (750 - for Unix) Top text margin on page, expressed as thousandths of an inch.
MARGINS_RIGHT LONG 1000 Right text margin on page, expressed as thousandths of an inch.
MARGINS_BOTTOM LONG 1000 (750 - for Unix) Bottom text margin on page, expressed as thousandths of an inch.
PAGE_WIDTH DIMENSION 8500 Width of resulting page, expressed as thousandths of an inch.
PAGE_HEIGHT DIMENSION 11000 Height of resulting page, expressed as thousandths of an inch.
POINT_SIZE INT 10 (-1 - for Unix) Font metric: If 0 then lines per page and character per line is used, else - specify font size.
WEIGHT UINT FALSE (0) TRUE, FALSE Font metric: if TRUE use bold font.
ITALIC AT_BOOL FALSE TRUE, FALSE Font metric: if TRUE use italic font.
TAB_STOP UINT 3 (4 - for Unix) The number of characters per tab.
TYPE_FACE LP | CHAR "\x00" ("courier" - for Unix) Font metric:typeface name of the font, If empty string then default font used "Courier new".
LINES_PER_PAGE UINT 0 (60 - for Unix) Number of line per page.
CHAR_PER_LINE UINT 0 (80 - for Unix) Number of characters per line.
COMPATIBILITY_MODE AT_BOOL FALSE (TRUE - for Unix) TRUE, FALSE If TRUE use old algorithm, otherwise use ImageGear Algorithm.

Comments:

This is a widely used format for storing plain text files. ASCII data can also be used to give vector data instructions, but this is not supported by ImageGear.

The current, commonly used version of ASCII uses a 7-bit format and is known as "Full" or "Extended ASCII". The 128 (27) different data values include printable and non-printable values. The non-printable values are represented by the first 32 (0-31) values of ASCII, and are called "control values". They are used to communicate with screens or printers for placement of the characters. These control values represent tabs, line feeds, spaces, etc. Combinations of these values create "escape sequences" whose values are device-dependent upon implementation. To keep an ASCII file completely device-independent, a file usually does not contain any control values other than tab, line feed, and carriage return.

What makes a TXT file different from many bitmap formats is the byte order. A file is written in the natural order that it appears when output. There is no division into bit planes, or reverse order of bits and bytes. The eighth bit of each byte is normally set to zero. In older versions of TXT files, this was often used as a parity bit.

References Used

Brown, C. Wayne, and Barry J. Shepherd. Graphics File Formats: Reference and Guide. Greenwich, CT.: Manning Publications, 1992.

Kay, David C. and John R. Levine. Graphics File Formats, 2nd ed. Windcrest /McGraw-Hill, 1995.