Progressive Graphics File

Short description: File format

PGF

Filename extension| `.pgf`
Magic number| `504746`h (ASCII PGF)
Developed by| xeraina GmbH
Initial release| 2000; 26 years ago (2000)
Latest release|

7.21.7
(2021; 5 years ago (2021))

Type of format| wavelet-based bitmapped image format
Extended from| JPEG, PNG

PGF (Progressive Graphics File) is a wavelet-based bitmapped image format that employs lossless and lossy data compression. PGF was created to improve upon and replace the JPEG format. It was developed at the same time as JPEG 2000 but with a focus on speed over compression ratio.[citation needed]

PGF can operate at higher compression ratios without taking more encoding/decoding time and without generating the characteristic "blocky and blurry" artifacts of the original DCT-based JPEG standard.[2] It also allows more sophisticated progressive downloads.[citation needed]

## Contents

* 1 Color models
* 2 Technical discussion
* 2.1 Color components transformation
* 2.2 Wavelet transform
* 2.3 Quantization
* 2.4 Coding
* 2.5 Comparison with other file formats
* 3 Available software
* 4 See also
* 4.1 File extension
* 5 References

## Color models

PGF supports a wide variety of color models:

* Grayscale with 1, 8, 16, or 31 bits per pixel
* Indexed color with palette size of 256
* RGB color image with 12, 16 (red: 5 bits, green: 6 bits, blue: 5 bits), 24, or 48 bits per pixel
* ARGB color image with 32 bits per pixel
* L*a*b color image with 24 or 48 bits per pixel
* CMYK color image with 32 or 64 bits per pixel

## Technical discussion

PGF claims to achieve an improved compression quality over JPEG adding or improving features such as scalability. Its compression performance is similar to the original JPEG standard. Very low and very high compression rates (including lossless compression) are also supported in PGF. The ability of the design to handle a very large range of effective bit rates is one of the strengths of PGF. For example, to reduce the number of bits for a picture below a certain amount, the advisable thing to do with the first JPEG standard is to reduce the resolution of the input image before encoding it — something that is ordinarily not necessary for that purpose when using PGF because of its wavelet scalability properties.

The PGF process chain contains the following four steps:

1. Color space transform (in case of color images)
2. Discrete Wavelet Transform
3. Quantization (in case of lossy data compression)
4. Hierarchical bit-plane run-length encoding

### Color components transformation

Initially, images have to be transformed from the RGB color space to another color space, leading to three components that are handled separately. PGF uses a fully reversible modified YUV color transform. The transformation matrices are:

[YrUrVr]=[1412141−100−11][RGB];[RGB]=[134−141−14−141−1434][YrUrVr]

The chrominance components can be, but do not necessarily have to be, down-scaled in resolution.

### Wavelet transform

The color components are then wavelet transformed to an arbitrary depth. In contrast to JPEG 1992 which uses an 8x8 block-size discrete cosine transform, PGF uses one reversible wavelet transform: a rounded version of the biorthogonal CDF 5/3 wavelet transform. This wavelet filter bank is exactly the same as the reversible wavelet used in JPEG 2000. It uses only integer coefficients, so the output does not require rounding (quantization) and so it does not introduce any quantization noise.

### Quantization

After the wavelet transform, the coefficients are scalar-quantized to reduce the amount of bits to represent them, at the expense of a loss of quality. The output is a set of integer numbers which have to be encoded bit-by-bit. The parameter that can be changed to set the final quality is the quantization step: the greater the step, the greater is the compression and the loss of quality. With a quantization step that equals 1, no quantization is performed (it is used in lossless compression). In contrast to JPEG 2000, PGF uses only powers of two, therefore the parameter value i represents a quantization step of 2i. Just using powers of two makes no need of integer multiplication and division operations.

### Coding

The result of the previous process is a collection of sub-bands which represent several approximation scales. A sub-band is a set of coefficients — integer numbers which represent aspects of the image associated with a certain frequency range as well as a spatial area of the image.

The quantized sub-bands are split further into blocks, rectangular regions in the wavelet domain. They are typically selected in a way that the coefficients within them across the sub-bands form approximately spatial blocks in the (reconstructed) image domain and collected in a fixed size macroblock.

The encoder has to encode the bits of all quantized coefficients of a macroblock, starting with the most significant bits and progressing to less significant bits. In this encoding process, each bit-plane of the macroblock gets encoded in two so-called coding passes, first encoding bits of significant coefficients, then refinement bits of significant coefficients. Clearly, in lossless mode all bit-planes have to be encoded, and no bit-planes can be dropped.

Only significant coefficients are compressed with an adaptive run-length/Rice (RLR) coder, because they contain long runs of zeros. The RLR coder with parameter k (logarithmic length of a run of zeros) is also known as the elementary Golomb code of order 2k.

### Comparison with other file formats

* JPEG 2000 is slightly more space-efficient in handling natural images. The PSNR for the same compression ratio is on average 3% better than the PSNR of PGF. It has a small advantage in compression ratio but longer encoding and decoding times.[2]
* PNG (Portable Network Graphics) is more space-efficient in handling images with many pixels of the same color.

There are several self-proclaimed advantages of PGF over the ordinary JPEG standard:[2]

* Superior compression performance: The image quality (measured in PSNR) for the same compression ratio is on average 3% better than the PSNR of JPEG. At lower bit rates (e.g. less than 0.25 bits/pixel for gray-scale images), PGF has a much more significant advantage over certain modes of JPEG: artifacts are less visible and there is almost no blocking. The compression gains over JPEG are attributed to the use of DWT.
* Multiple resolution representation: PGF provides seamless compression of multiple image components, with each component carrying from 1 to 31 bits per component sample. With this feature there is no need for separately stored preview images (thumbnails).
* Progressive transmission by resolution accuracy, commonly referred to as progressive decoding: PGF provides efficient code-stream organizations which are progressive by resolution. This way, after a smaller part of the whole file has been received, it is possible to see a lower quality of the final picture, the quality can be improved monotonically getting more data from the source.
* Lossless and lossy compression: PGF provides both lossless and lossy compression in a single compression architecture. Both lossy and lossless compression are provided by the use of a reversible (integer) wavelet transform.
* Side channel spatial information: Transparency and alpha planes are fully supported
* ROI extraction: Since version 5, PGF supports extraction of regions of interest (ROI) without decoding the whole image.

## Available software

The author published libPGF via a SourceForge, under the GNU Lesser General Public License version 2.0.[1] Xeraina offers a free Windows console encoder and decoder, and PGF viewers based on WIC for 32bit and 64bit Windows platforms. Other WIC applications including File Explorer are able to display PGF images after installing this viewer.[3]

Digikam is a popular open-source image editing and cataloging software that uses libPGF for its thumbnails. It makes use of the progressive decoding feature of PGF images to store a single version of each thumbnail, which can then be decoded to different resolutions without loss, thus allowing users to dynamically change the size of the thumbnails without having to recalculate them again.[citation needed]

## See also

* Comparison of graphics file formats
* Related graphics file formats: ECW, JPEG, JPEG 2000, JPEG XR
* Image file formats
* Image compression

### File extension

File extension `.pgf` and the TLA PGF are also used for unrelated purposes:

* Adobe Illustrator used a Progressive Graphics Format before Encapsulated PostScript.
* PGF/TikZ uses a Portable Graphics Format in SourceForge project PGF.
* XnView and Konvertor associate file extension `.pgf` with Portfolio Graphics.

## References

1. ↑ 1.0 1.1 Christoph Stamm (2015). "PGF libPGF.org". SourceForge project. http://libpgf.org/.
2. ↑ 2.0 2.1 2.2 Stamm, Christoph (2002). "PGF - A new progressive file format for lossy and lossless image compression". https://libpgf.org/wp-content/uploads/2023/03/PGF_stamm_wscg02.pdf.
3. ↑ "PGF download". xeraina. 2013. https://www.xeraina.ch/downloads/.

* v
* t
* e

Graphics file formats

Raster|

* ANI
* ANIM
* APNG
* ART
* BMP
* BPG
* BSAVE
* CAL
* CIN
* CPC
* CPT
* DDS
* DPX
* ECW
* EXR
* FITS
* FLIC
* FLIF
* FPX
* GIF
* HDRi
* HEVC
* ICER
* ICNS
* ICO / CUR
* ICS
* ILBM
* JBIG
* JBIG2
* JNG
* JPEG
* JPEG-LS
* JPEG 2000
* JPEG XR
* JPEG XT
* JPEG-HDR
* KRA
* MNG
* MIFF
* NRRD
* PAM
* PBM / PGM / PPM / PNM
* PCX
* PGF
* PICtor
* PNG
* PSD / PSB
* PSP
* QTVR
* RAS
* RGBE
* Logluv TIFF
* SGI
* TGA
* TIFF
* TIFF/EP
* TIFF/IT
* UFO/ UFP
* WBMP
* WebP
* XBM
* XCF
* XPM
* XWD

Raw|

* CIFF
* DNG

Vector|

* AI
* CDR
* CGM
* DXF
* EVA
* EMF
* Gerber
* HVIF
* IGES
* PGML
* SVG
* VML
* WMF
* Xar

Compound|

* CDF
* DjVu
* EPS
* PDF
* PICT
* PS
* SWF
* XAML

Metadata|

* Exchangeable image file format (Exif)
* Extensible Metadata Platform (XMP)

* Category
* Comparison

* v
* t
* e

Multimedia compression and container formats

Video
compression|

| ISO, IEC, MPEG|

* MJPEG
* Motion JPEG 2000
* MPEG-1
* MPEG-2
* Part 2
* MPEG-4
* Part 2 / ASP
* Part 10 / AVC
* MPEG-H
* Part 2 / HEVC
* MPEG-I
* Part 3 / VVC

|

ITU-T, VCEG|

* H.120
* DCT
* H.261
* H.262
* H.263
* H.264 / AVC
* H.265 / HEVC
* H.266 / VVC
* DV

SMPTE|

* VC-1
* VC-2
* VC-3
* VC-5

TrueMotion|

* TrueMotion S
* DCT
* VP3
* VP6
* VP7
* VP8
* VP9
* AV1

Others|

* Apple Video
* AVS
* Bink
* Cinepak
* Daala
* DVI
* EVC
* FFV1
* Huffyuv
* Indeo
* Lagarith
* Microsoft Video 1
* MSU Lossless
* OMS Video
* Pixlet
* ProRes 422
* ProRes 4444
* QuickTime
* Animation
* Graphics
* RealVideo
* RTVideo
* SheerVideo
* Smacker
* Sorenson Video/Spark
* Theora
* Thor
* WMV
* XEB
* YULS

Audio
compression|

| ISO, IEC, MPEG|

* MPEG-1 Layer II
* Multichannel
* MPEG-1 Layer I
* MPEG-1 Layer III (MP3)
* AAC
* HE-AAC
* AAC-LD
* MPEG Surround
* MPEG-4 ALS
* MPEG-4 SLS
* MPEG-4 DST
* MPEG-4 HVXC
* MPEG-4 CELP
* MPEG-D USAC
* MPEG-H 3D Audio

|

ITU-T|

* G.711
* A-law
* µ-law
* G.718
* G.719
* G.722
* G.722.1
* G.722.2
* G.723
* G.723.1
* G.726
* G.728
* G.729
* G.729.1

IETF|

* Opus
* iLBC
* Speex
* Vorbis

3GPP|

* AMR
* AMR-WB
* AMR-WB+
* EVRC
* EVRC-B
* EVS
* GSM-HR
* GSM-FR
* GSM-EFR

ETSI|

* AC-3
* AC-4
* DTS

Others|

* ACELP
* ALAC
* Asao
* ATRAC
* AVS
* CELT
* Codec 2
* DRA
* FLAC
* iSAC
* Monkey's Audio
* TTA
* True Audio
* MT9
* Musepack
* OptimFROG
* OSQ
* QCELP
* RCELP
* RealAudio
* RTAudio
* SD2
* SHN
* SILK
* Siren
* SMV
* SVOPC
* TwinVQ
* VMR-WB
* VSELP
* WavPack
* WMA
* MQA
* aptX
* aptX HD
* aptX Low Latency
* aptX Adaptive
* LDAC
* LHDC
* LLAC

Image
compression|

| IEC, ISO,
IETF, W3C,
ITU-T, JPEG|

* CCITT Group 4
* DCT
* HEIF
* HEVC
* JPEG
* JPEG XR
* JPEG XT
* TIFF/EP
* Arithmetic
* JBIG
* JBIG2
* JPEG-LS
* JPEG 2000
* LZ
* GIF
* PNG
* TIFF
* TIFF/IT

|

Others|

* APNG
* BPG
* DjVu
* EXR
* FLIF
* ICER
* MNG
* PGF
* QTVR
* WBMP
* WebP

Containers|

| ISO, IEC|

* MPEG-ES
* MPEG-PES
* MPEG-PS
* MPEG-TS
* ISO base media file format
* MPEG-4 Part 14 (MP4)
* Motion JPEG 2000
* MPEG-21 Part 9
* MPEG media transport

|

ITU-T|

* H.222.0
* T.802

IETF|

* RTP
* Ogg

SMPTE|

* GXF
* MXF

Others|

* 3GP and 3G2
* AMV
* ASF
* AIFF
* AVI
* AU
* BPG
* Bink
* Smacker
* BMP
* DivX Media Format
* EVO
* Flash Video
* IFF
* M2TS
* Matroska
* WebM
* QuickTime File Format
* RatDVD
* RealMedia
* RIFF
* WAV
* MOD and TOD
* VOB, IFO and BUP

Collaborations|

* NETVC
* MPEG LA
* HEVC Advance

Methods|

* Discrete cosine transform
* DCT
* MDCT
* Entropy
* Arithmetic
* Huffman
* Modified
* FFT
* LPC
* ACELP
* CELP
* LSP
* WLPC
* Lossless
* Lossy
* LZ
* DEFLATE
* LZW
* PCM
* A-law
* µ-law
* ADPCM
* DPCM
* Transform
* Wavelet
* Daubechies
* DWT
* Transform

Lists|

* Comparison of audio coding formats
* Comparison of video codecs
* List of codecs

See Compression methods for techniques and Compression software for codecs

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Progressive Graphics File. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Progressive_Graphics_File&oldid=191109"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template