Warning: Unknown: Unable to allocate memory for pool. in Unknown on line 0

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/index.php on line 54

Warning: Cannot modify header information - headers already sent in /usr/local/www/mediawiki/includes/WebStart.php on line 63

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/WebStart.php on line 94

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/WebStart.php on line 97

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/WebStart.php on line 100

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/WebStart.php on line 103

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Defines.php on line 187

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/WebStart.php on line 115

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/WebStart.php on line 134

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/LocalSettings.php on line 137

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/LocalSettings.php on line 139

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/LocalSettings.php on line 144

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/LocalSettings.php on line 145

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/LocalSettings.php on line 153

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/WebStart.php on line 150

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/WebStart.php on line 157

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Setup.php on line 381

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Setup.php on line 382

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Setup.php on line 383

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Setup.php on line 384

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/languages/Language.php on line 20

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: include_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Skin.php on line 153

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/skins/Vector.deps.php on line 11

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Skin.php on line 155

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: Cannot modify header information - headers already sent in /usr/local/www/mediawiki/includes/WebResponse.php on line 38

Warning: Cannot modify header information - headers already sent in /usr/local/www/mediawiki/includes/WebResponse.php on line 38

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: include(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/resourceloader/ResourceLoader.php on line 201

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/json/FormatJson.php on line 12

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
PCX - Just Solve the File Format Problem

PCX

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
(Software)
 
(19 intermediate revisions by 7 users not shown)
Line 3: Line 3:
 
|subcat=Graphics
 
|subcat=Graphics
 
|extensions={{ext|pcx}}, {{ext|pcc}}
 
|extensions={{ext|pcx}}, {{ext|pcc}}
|mimetypes={{mimetype|image/x-pcx}}
+
|mimetypes={{mimetype|image/vnd.zbrush.pcx}}, {{mimetype|image/x-pcx}}
|pronom={{PRONOM|fmt/90}}, others
+
|pronom={{PRONOM|fmt/86}}, {{PRONOM|fmt/87}}, {{PRONOM|fmt/88}}, {{PRONOM|fmt/89}}, {{PRONOM|fmt/90}}
 +
|kaitai struct=pcx
 
|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''' (Personal Computer eXchange) 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''.
  
== Format ==
+
== Identification ==
PCX files have a 128-byte fixed header.
+
The first byte of a PCX file is <code>0x0a</code>. The second byte (the version number) is 0, 2, 3, 4, or 5. The third byte (the ''encoding'') is 1 or (rarely) 0.
  
== Identifiers ==
+
== Format details ==
* PCX v0: {{PRONOM|fmt/86}}
+
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.
* PCX v2: {{PRONOM|fmt/87}}
+
* PCX v3: {{PRONOM|fmt/88}}
+
* PCX v4: {{PRONOM|fmt/89}}
+
* PCX v5: {{PRONOM|fmt/90}}
+
  
== Identification ==
+
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 first byte of a PCX file is <code>0x0a</code>. The second byte (the version number) is 0, 2, 3, 4, or 5. The third byte (the compression type) should always be 1, though it's possible that 0 is also allowed in some variants of PCX.
+
 
 +
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, black and white (other colors may be possible, but are not well-supported)
 +
* 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).
 +
 
 +
=== Resolution ===
 +
The PCX header has X- and Y-"resolution" fields, which you might think would help to display PCX images at the correct aspect ratio. Unfortunately, these fields are all but useless. If not set to zero, they might contain any of the following:
 +
* The dots per inch
 +
* The pixel dimensions of the target screen mode
 +
* The pixel dimensions of the image itself
 +
* A failed attempt at one of the above things
  
 
== See also ==
 
== See also ==
* [[DCX]]
+
* [[DCX]] - A multi-image form of PCX
 +
* [[Word for DOS screen capture]] - Similar format
  
 
== 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]
 +
* [http://www.fysnet.net/pcxfile.htm PCX graphics files explained]
 +
 
 +
== Metaformat files ==
 +
 
 +
* {{Synalysis|pcx}}
  
 
== Software ==
 
== Software ==
 
* [[ImageMagick]]
 
* [[ImageMagick]]
 +
* [[Konvertor]]
 
* [[Netpbm]]: ppmtopcx, pcxtoppm
 
* [[Netpbm]]: ppmtopcx, pcxtoppm
 
* [http://www.irfanview.com/ IrfanView]
 
* [http://www.irfanview.com/ IrfanView]
 
* [[XnView]]
 
* [[XnView]]
 +
* [[FFmpeg]]
 +
* {{Deark}}
 +
* [http://snisurset.net/code/abydos/ abydos]
 +
* [http://toastytech.com/guis/win1x2x.html Applications for Windows 1.x and 2.x] ("For historical preservation")
 +
** [http://toastytech.com/guis/PC%20Paintbrush%20for%20Windows%201.05%20(3.5).zip {PC Paintbrush for Windows} v1.05] (for Windows 1.x and 2.x)
 +
** [http://toastytech.com/guis/pbrushwin122.zip {PC Paintbrush Plus for Windows} v1.22] (for Windows 2.x)
  
 
== Sample files ==
 
== Sample files ==
 
* http://samples.libav.org/image-samples/pcx/
 
* http://samples.libav.org/image-samples/pcx/
 
* http://cd.textfiles.com/clipart1996/ ...
 
* http://cd.textfiles.com/clipart1996/ ...
 +
* http://samples.libav.org/image-samples/pcx/cga/ - Examples of (bits=2, planes=1)
 +
* http://cd.textfiles.com/hof91/icondemo/animals.pcx - Example of (bits=1, planes=3, version=3)
 +
* http://cd.textfiles.com/hof91/icondemo/shuttle1.pcx - Example of (bits=1, planes=4, version=3)
 +
* {{DexvertSamples|image/pcx}}
  
== 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]
 +
* [http://www.theohupkens.nl/English/PCX.htm The PCX File Format: Very Old and Somewhat Gray]
  
 
[[Category:Microsoft]]
 
[[Category:Microsoft]]

Latest revision as of 14:04, 6 June 2024

File Format
Name PCX
Ontology
Extension(s) .pcx, .pcc
MIME Type(s) image/vnd.zbrush.pcx, image/x-pcx
PRONOM fmt/86, fmt/87, fmt/88, fmt/89, fmt/90
Kaitai Struct Spec pcx.ksy
Released ~1984

PCX (Personal Computer eXchange) 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

[edit] 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 (rarely) 0.

[edit] 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, black and white (other colors may be possible, but are not well-supported)
  • 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.

[edit] 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.

[edit] 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).

[edit] Resolution

The PCX header has X- and Y-"resolution" fields, which you might think would help to display PCX images at the correct aspect ratio. Unfortunately, these fields are all but useless. If not set to zero, they might contain any of the following:

  • The dots per inch
  • The pixel dimensions of the target screen mode
  • The pixel dimensions of the image itself
  • A failed attempt at one of the above things

[edit] See also

[edit] Specifications

[edit] Metaformat files

[edit] Software

[edit] Sample files

[edit] Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox

Warning: Cannot modify header information - headers already sent in /usr/local/www/mediawiki/includes/WebResponse.php on line 38

Warning: Cannot modify header information - headers already sent in /usr/local/www/mediawiki/includes/WebResponse.php on line 38

Warning: Cannot modify header information - headers already sent in /usr/local/www/mediawiki/includes/WebResponse.php on line 38

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007