Progressive Graphics File: Difference between revisions
VulcanSphere (talk | contribs) Importing Wikidata short description: "File format" (Shortdesc helper) |
|||
(8 intermediate revisions by 5 users not shown) | |||
Line 16: | Line 16: | ||
| type = [[wavelet]]-based [[Raster graphics|bitmapped]] [[Graphics file format|image format]] |
| type = [[wavelet]]-based [[Raster graphics|bitmapped]] [[Graphics file format|image format]] |
||
| released = {{Start date and age|2000}} |
| released = {{Start date and age|2000}} |
||
| latest release version = 7. |
| latest release version = 7.21.7 |
||
| latest release date = {{Start date and age| |
| latest release date = {{Start date and age|2021}} |
||
| open = [[GNU Lesser General Public License|LGPLv2]]<ref name="SF">{{cite web|url=http://libpgf.org/|title=PGF libPGF.org|work=[[SourceForge]] project |
| open = [[GNU Lesser General Public License|LGPLv2]]<ref name="SF">{{cite web|url=http://libpgf.org/|title=PGF libPGF.org|work=[[SourceForge]] project|year=2015|author=Christoph Stamm|access-date=14 September 2015}}</ref> |
||
| extended from = [[JPEG]], [[Portable Network Graphics|PNG]] |
| extended from = [[JPEG]], [[Portable Network Graphics|PNG]] |
||
}} |
}} |
||
Line 24: | Line 24: | ||
'''PGF''' ('''Progressive Graphics File''') is a [[wavelet]]-based [[Raster graphics|bitmapped]] [[Graphics file format|image format]] that employs [[lossless data compression|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 [[data compression ratio|compression ratio]].{{citation needed|date=October 2011}} |
'''PGF''' ('''Progressive Graphics File''') is a [[wavelet]]-based [[Raster graphics|bitmapped]] [[Graphics file format|image format]] that employs [[lossless data compression|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 [[data compression ratio|compression ratio]].{{citation needed|date=October 2011}} |
||
PGF can operate at higher compression ratios without taking more encoding/decoding time and without generating the characteristic "blocky and blurry" [[compression artifact|artifacts]] of the original [[Discrete cosine transform|DCT]]-based JPEG standard.<ref name="stamm">{{cite web|url= |
PGF can operate at higher compression ratios without taking more encoding/decoding time and without generating the characteristic "blocky and blurry" [[compression artifact|artifacts]] of the original [[Discrete cosine transform|DCT]]-based JPEG standard.<ref name="stamm">{{cite web |author=Stamm |first=Christoph |date=2002 |title=PGF – A new progressive file format for lossy and lossless image compression |url=https://libpgf.org/wp-content/uploads/2023/03/PGF_stamm_wscg02.pdf |url-status=live |archive-url=https://web.archive.org/web/20070307101234/http://www.libpgf.org/uploads/media/PGF_stamm_wscg02.pdf |archive-date=7 March 2007 |access-date=12 April 2023}}</ref> It also allows more sophisticated [[progressive download]]s.{{citation needed|date=October 2011}} |
||
== Color models == |
== Color models == |
||
PGF supports a wide variety of color models: |
PGF supports a wide variety of color models: |
||
* [[Grayscale]] with 1, 8, 16, or 31 bits per pixel |
* [[Grayscale]] with 1, 8, 16, or 31 bits per pixel |
||
* [[Indexed color]] with palette size of 256 |
* [[Indexed color]] with palette size of 256 |
||
Line 100: | Line 100: | ||
* '''Superior compression performance''': The image quality (measured in [[Peak signal-to-noise ratio|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 [[Discrete wavelet transform|DWT]]. |
* '''Superior compression performance''': The image quality (measured in [[Peak signal-to-noise ratio|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 [[Discrete wavelet transform|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 ([[thumbnail]]s). |
* '''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 ([[thumbnail]]s). |
||
* '''Progressive transmission''' by resolution accuracy, commonly referred to as progressive decoding: PGF provides efficient |
* '''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. |
* '''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 |
* '''Side channel spatial information''': Transparency and alpha planes are fully supported |
||
Line 106: | Line 106: | ||
==Available software== |
==Available software== |
||
The author published ''libPGF'' via a [[SourceForge]], under the [[GNU Lesser General Public License]] version 2.0.<ref name="SF" /> Xeraina offers a free [[ |
The author published ''libPGF'' via a [[SourceForge]], under the [[GNU Lesser General Public License]] version 2.0.<ref name="SF" /> Xeraina offers a free [[Win32 console|Windows console]] encoder and decoder, and PGF viewers based on [[Windows Imaging Component|WIC]] for 32bit and 64bit Windows platforms. Other WIC applications including File Explorer are able to display PGF images after installing this viewer.<ref>{{cite web |year=2013 |title=PGF download |url=https://www.xeraina.ch/downloads/ |access-date=12 April 2023 |publisher=xeraina}}</ref> |
||
[[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|date=August 2020}} |
[[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|date=August 2020}} |
||
Line 121: | Line 121: | ||
* [[Adobe Illustrator Artwork|Adobe Illustrator]] used a ''Progressive Graphics Format'' before [[Encapsulated PostScript]]. |
* [[Adobe Illustrator Artwork|Adobe Illustrator]] used a ''Progressive Graphics Format'' before [[Encapsulated PostScript]]. |
||
* [[PGF/TikZ]] uses a ''Portable Graphics Format'' in [[SourceForge]] project ''PGF''. |
* [[PGF/TikZ]] uses a ''Portable Graphics Format'' in [[SourceForge]] project ''PGF''. |
||
* [[XnView]] and Konvertor associate file extension <code>.pgf</code> with ''Portfolio Graphics''. |
* [[XnView]] and [[Konvertor]] associate file extension <code>.pgf</code> with ''[[Portfolio Graphics]]''. |
||
==References== |
==References== |
Latest revision as of 04:12, 17 January 2024
![]() | This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)
|
Filename extension |
.pgf |
---|---|
Internet media type | image/x-pgf |
Magic number | 504746 h (ASCII PGF) |
Developed by | xeraina GmbH |
Initial release | 2000 |
Latest release | 7.21.7 2021 |
Type of format | wavelet-based bitmapped image format |
Extended from | JPEG, PNG |
Open format? | LGPLv2[1] |
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]
Color models
[edit]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
[edit]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:
- Color space transform (in case of color images)
- Discrete Wavelet Transform
- Quantization (in case of lossy data compression)
- Hierarchical bit-plane run-length encoding
Color components transformation
[edit]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:
The chrominance components can be, but do not necessarily have to be, down-scaled in resolution.
Wavelet transform
[edit]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
[edit]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
[edit]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
[edit]- 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
[edit]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
[edit]- Comparison of graphics file formats
- Related graphics file formats: ECW, JPEG, JPEG 2000, JPEG XR
- Image file formats
- Image compression
File extension
[edit]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
[edit]- ^ a b Christoph Stamm (2015). "PGF libPGF.org". SourceForge project. Retrieved 14 September 2015.
- ^ a b c Stamm, Christoph (2002). "PGF – A new progressive file format for lossy and lossless image compression" (PDF). Archived (PDF) from the original on 7 March 2007. Retrieved 12 April 2023.
- ^ "PGF download". xeraina. 2013. Retrieved 12 April 2023.