Pegasus PIC

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Identification)
Line 13: Line 13:
  
 
== Format details ==
 
== Format details ==
A PIC file contains embedded [[JPEG]] data, but it lacks the critical DQT segment(s), and may lack DHT segment(s), so it can't just be extracted as a standard JPEG file. PIC format compression  replaces the JPEG Huffman encoder with the proprietary ELS entropy encoder for 15% more compression.
+
A PIC file contains embedded [[JPEG]] data, but it lacks the critical DQT segment(s), and may lack DHT segment(s), so it can't just be extracted as a standard JPEG file. PIC format compression  replaces the JPEG Huffman encoder with the proprietary ELS entropy encoder<ref>https://web.archive.org/web/20120523022533/http://accusoft.com/technology/elscoder.pdf</ref> for 15% more compression.
  
 
=== Notes on decoding ===
 
=== Notes on decoding ===

Revision as of 20:52, 2 July 2024

File Format
Name Pegasus PIC
Ontology
Extension(s) .pic, .kqp
Released ≤1995

Pegasus PIC is a raster graphics format associated with some products from Pegasus Imaging Corporation. It may also be known as Pegasus JPEG, or PIC JPEG. It was also rebranded in some form as Konica Quality Photo (KQP). Format us proprietary from Pegasus, branded under the ePic name.[1] Now owned by Accusoft and not distributed.[2]

PIC format is an incompatible extension of BMP.

Contents

Discussion

Though the PICView software gives the impression that they are different formats, it's not clear that there is any distinction between PIC and KQP. If there is a difference, it could be that KQP is a restricted profile of PIC, and/or that KQP files are the ones that lack a JPEG "DHT" segment.

Format details

A PIC file contains embedded JPEG data, but it lacks the critical DQT segment(s), and may lack DHT segment(s), so it can't just be extracted as a standard JPEG file. PIC format compression replaces the JPEG Huffman encoder with the proprietary ELS entropy encoder[3] for 15% more compression.

Notes on decoding

The following information is not based on official sources. It may be wrong or incomplete.

If the PIC file does not contain a DHT (Huffman table definition) segment, use the example tables given in the JPEG specification (T.81 section K.3.3; see JPEG#Specifications). These may also be found in the IJG libjpeg source code, in the file jcparam.c (see JPEG#Software).

To construct suitable quantization tables (DQT segment), start with example luminance and chrominance tables given in the JPEG specification (T.81 section K.1). These may also be found in the IJG libjpeg source code, in the files jcparam.c and wizard.txt. They will likely be used if you create a new JPEG file with "cjpeg -quality 50".

Scale each value in each table by a certain factor. A PIC file should contain an APP1 segment whose data begins with the signature "PIC\0". The second byte after the signature is a code for the luminance, and the third is a code for the chrominance.

The scale factor for the luminance table is (approximately?) the luminance code divided by 32. Likewise for the chrominance table.

Identification

Known PIC/KQP files start with ASCII "BM". They have 44 00 00 00 at offset 14, indicating a BMP "INFOHEADER" size of 68. They have 4a 50 45 47 ("JPEG") at offset 30.

A later version "PIC2" is used for the PIC/KQP formats and have the ASCII "PIC2" at the beginning of the file. With "JPGE" at offset 22.

Software

Sample files

See also KQP#Sample files.

References

  1. https://web.archive.org/web/19990224220644/http://www.jpg.com/imagetech_epic.htm
  2. https://www.accusoft.com/products/sdks/pictools-photo/
  3. https://web.archive.org/web/20120523022533/http://accusoft.com/technology/elscoder.pdf
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox