PCX

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
Line 7: Line 7:
 
|released=~1984
 
|released=~1984
 
}}
 
}}
'''PCX''' was the native image format of a DOS-based program PC Paintbrush from ZSoft Corporation, and was for a time (especially the late 1980s) a very popular image format among users of IBM PC compatibles and the PC/MS-DOS operating system. Much clip art was distributed in this format. However, it was tied closely to platform-specific attributes such as the particular graphic modes available in early PCs, and later lost ground to more platform-independent graphic formats like [[GIF]], [[JPEG]], and [[PNG]].
+
'''PCX''' was the native image format of a DOS-based program ''PC Paintbrush'' from ZSoft Corporation, and was for a time (especially the late 1980s) a very popular image format among users of IBM PC compatibles and the PC/MS-DOS operating system. Much clip art was distributed in this format. However, it was tied closely to platform-specific attributes such as the particular graphic modes available in early PCs, and later lost ground to more platform-independent graphic formats like [[GIF]], [[JPEG]], and [[PNG]].
  
PC Paintbrush was licensed to Microsoft, and it evolved into the Paint/Paintbrush application included with Windows. The versions for Windows 3.0 through Windows 95 support PCX format.
+
PC Paintbrush was licensed to Microsoft, and it evolved into the Paint/Paintbrush application included with Windows. The versions for Windows 3.0 through Windows 95 support PCX format. There was also a product named ''Microsoft Paintbrush 2.0''.
  
 
== Identifiers ==
 
== Identifiers ==
Line 24: Line 24:
 
A PCX file consists of a 128-byte fixed header (48 bytes of which may be used for a palette), followed by the pixel data, followed in some cases by a 769-byte palette segment.
 
A PCX file consists of a 128-byte fixed header (48 bytes of which may be used for a palette), followed by the pixel data, followed in some cases by a 769-byte palette segment.
  
A number of different (unofficial) PCX specifications are easily found on the internet, but unfortunately, they tend to be incomplete, and ambiguous about certain details. Part of this may be the fault of the PCX format. PC Paintbrush itself reportedly may interpret the same file differently, depending on the version of the software, and the graphics mode being used.
+
A number of different PCX specifications can be found on the internet, but unfortunately, they tend to be incomplete, and ambiguous about certain details. Part of this may be the fault of the PCX format. PC Paintbrush itself reportedly may interpret the same file differently, depending on the version of the software, and the graphics mode being used.
  
 
The variety of a given PCX file is determined primarily by the combination of the ''bits per pixel per plane'' field at offset 3, and the ''number of planes'' field at offset 65. The following varieties of PCX seem to be common and well-supported:
 
The variety of a given PCX file is determined primarily by the combination of the ''bits per pixel per plane'' field at offset 3, and the ''number of planes'' field at offset 65. The following varieties of PCX seem to be common and well-supported:
 
* bits=1, planes=1: Bi-level, always black and white
 
* bits=1, planes=1: Bi-level, always black and white
* bits=1, planes=4: 16-color, using the palette contained in the header
+
* bits=1, planes=4, version≠3: 16-color, using the palette contained in the header
 
* bits=8, planes=1: 256-color, using the palette at the end of the file
 
* bits=8, planes=1: 256-color, using the palette at the end of the file
 
* bits=8, planes=3: 24-bit truecolor
 
* bits=8, planes=3: 24-bit truecolor
Line 35: Line 35:
  
 
=== Compression ===
 
=== Compression ===
The PCX specifications require that all PCX image data be compressed with a form of [[run-length encoding]], indicated by the ''encoding'' field having the value 1. However, modern imaging software often supports uncompressed PCX, in which the ''encoding'' field is 0. You can use [[ImageMagick]] to create such files, if you explicitly disable compression.
+
The PCX specifications require that all PCX image data be compressed with a form of [[run-length encoding]], indicated by the ''encoding'' field having the value 1. However, modern graphics software often supports uncompressed PCX, in which the ''encoding'' field is 0. You can use [[ImageMagick]] to create such files, if you explicitly disable compression.
  
 
=== Transparency ===
 
=== Transparency ===
We haven't located any PCX specification that mentions transparency, yet some modern imaging software supports 32-bit RGBA format (bits=8, planes=4). [[ImageMagick]] will readily create such files.
+
We haven't located any PCX specification that mentions transparency, yet some modern graphics software supports 32-bit RGBA format (bits=8, planes=4). [[ImageMagick]] will readily create such files.
  
 
The Wikipedia article also suggests a 16-bit RGBA format (bits=4, planes=4).
 
The Wikipedia article also suggests a 16-bit RGBA format (bits=4, planes=4).
Line 46: Line 46:
  
 
== Specifications ==
 
== Specifications ==
* http://www.fileformat.info/format/pcx/spec/index.htm
+
* [http://www.fileformat.info/format/pcx/spec/a10e75307b3a4cc49c3bbe6db4c41fa2/view.htm ZSoft Technical Reference Manual, Revision 5]
 +
* [http://www.martinreddy.net/gfx/2d/PCX.txt ZSoft Technical Reference Manual]
 +
** [http://www.textfiles.com/programming/FORMATS/pcx.txt PCX excerpt from the above document]
 +
* [http://www.textfiles.com/programming/FORMATS/pix_fmt.txt Picture format docs (of a number of formats including PCX)]
 +
* [http://www.shikadi.net/moddingwiki/PCX_Format PCX Format], from the DOS Game Modding Wiki
 +
* [http://www.drdobbs.com/pcx-graphics/184402396 Dr. Dobb's: PCX Graphics]
  
 
== Software ==
 
== Software ==
Line 53: Line 58:
 
* [http://www.irfanview.com/ IrfanView]
 
* [http://www.irfanview.com/ IrfanView]
 
* [[XnView]]
 
* [[XnView]]
 +
* [https://archive.org/details/ZS_1020 PC Paintbrush]
  
 
== Sample files ==
 
== Sample files ==
Line 58: Line 64:
 
* http://cd.textfiles.com/clipart1996/ ...
 
* http://cd.textfiles.com/clipart1996/ ...
  
== Resources ==
+
== Links ==
 +
* {{EGFF|pcx|PCX File Format Summary}}, from the [[Encyclopedia of Graphics File Formats]]
 
* [[Wikipedia:PCX|Wikipedia: PCX]]
 
* [[Wikipedia:PCX|Wikipedia: PCX]]
 
* [[Wikipedia:PC Paintbrush|Wikipedia: PC Paintbrush]]
 
* [[Wikipedia:PC Paintbrush|Wikipedia: PC Paintbrush]]
 
* [[Wikipedia:Microsoft Paint|Wikipedia: Microsoft Paint]]
 
* [[Wikipedia:Microsoft Paint|Wikipedia: Microsoft Paint]]
* [http://www.shikadi.net/moddingwiki/PCX_Format PCX Format], from the DOS Game Modding Wiki
+
* [http://www.danielsays.com/ss-gallery-dos-pc-paintbrush-310.html PC Paintbrush 3.10], from Daniel's Legacy Computer Collections
* {{EGFF|pcx|PCX File Format Summary}}, from the [[Encyclopedia of Graphics File Formats]]
+
* [http://www.danielsays.com/ss-gallery-dos-ms-paintbrush-20.html Microsoft Paintbrush 2.0], from Daniel's Legacy Computer Collections
* [http://www.textfiles.com/programming/FORMATS/pcx.txt PCX technical reference]
+
* [http://www.betaarchive.com/forum/viewtopic.php?t=29671 BetaArchive forum post about PC Paintbrush and PCX]
* [http://www.textfiles.com/programming/FORMATS/pix_fmt.txt Picture format docs (of a number of formats including PCX)]
+
* [https://archive.org/details/bitsavers_mindsetPCP_4931746 PC Paintbrush manual]
  
 
[[Category:Microsoft]]
 
[[Category:Microsoft]]

Revision as of 03:17, 23 December 2014

File Format
Name PCX
Ontology
Extension(s) .pcx, .pcc
MIME Type(s) image/x-pcx
PRONOM fmt/90, others
Released ~1984

PCX was the native image format of a DOS-based program PC Paintbrush from ZSoft Corporation, and was for a time (especially the late 1980s) a very popular image format among users of IBM PC compatibles and the PC/MS-DOS operating system. Much clip art was distributed in this format. However, it was tied closely to platform-specific attributes such as the particular graphic modes available in early PCs, and later lost ground to more platform-independent graphic formats like GIF, JPEG, and PNG.

PC Paintbrush was licensed to Microsoft, and it evolved into the Paint/Paintbrush application included with Windows. The versions for Windows 3.0 through Windows 95 support PCX format. There was also a product named Microsoft Paintbrush 2.0.

Contents

Identifiers

Identification

The first byte of a PCX file is 0x0a. The second byte (the version number) is 0, 2, 3, 4, or 5. The third byte (the encoding) is 1 or 0.

Format details

A PCX file consists of a 128-byte fixed header (48 bytes of which may be used for a palette), followed by the pixel data, followed in some cases by a 769-byte palette segment.

A number of different PCX specifications can be found on the internet, but unfortunately, they tend to be incomplete, and ambiguous about certain details. Part of this may be the fault of the PCX format. PC Paintbrush itself reportedly may interpret the same file differently, depending on the version of the software, and the graphics mode being used.

The variety of a given PCX file is determined primarily by the combination of the bits per pixel per plane field at offset 3, and the number of planes field at offset 65. The following varieties of PCX seem to be common and well-supported:

  • bits=1, planes=1: Bi-level, always black and white
  • bits=1, planes=4, version≠3: 16-color, using the palette contained in the header
  • bits=8, planes=1: 256-color, using the palette at the end of the file
  • bits=8, planes=3: 24-bit truecolor

Unfortunately, there are many other varieties that are not necessarily so portable.

Compression

The PCX specifications require that all PCX image data be compressed with a form of run-length encoding, indicated by the encoding field having the value 1. However, modern graphics software often supports uncompressed PCX, in which the encoding field is 0. You can use ImageMagick to create such files, if you explicitly disable compression.

Transparency

We haven't located any PCX specification that mentions transparency, yet some modern graphics software supports 32-bit RGBA format (bits=8, planes=4). ImageMagick will readily create such files.

The Wikipedia article also suggests a 16-bit RGBA format (bits=4, planes=4).

See also

  • DCX - A multi-image form of PCX

Specifications

Software

Sample files

Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox