### ----------------------------------------------------
### -- PDF::ISO_32000_2
### -- Licenses: Artistic-2.0
### -- Authors: David Warring
### -- File: lib/ISO_32000_2/Table_13-Optional_parameter_for_the_DCTDecode_filter.rakumod
### ----------------------------------------------------
use v6;
role ISO_32000_2::Table_13-Optional_parameter_for_the_DCTDecode_filter {
    method ColorTransform {...};
}

=begin pod

=head1 Description

Table 13 – Optional parameter for the DCTDecode filter

=head1 Methods (Entries)

=head2 ColorTransform [integer]
- (Optional) A code specifying the transformation that is performed on the sample values:
0 No transformation.
1 If the image has three colour components, RGB values is transformed to YCbCr before encoding and from YCbCr to RGB after decoding. If the image has four components, CMYK values is transformed to YCbCrK before encoding and from YCbCrK to CMYK after decoding. This option is ignored if the image has one or two colour components.
If the encoding algorithm has inserted the Adobe-defined marker code in the encoded data indicating the ColorTransform value, then the colours is transformed, or not, after the DCT decoding has been performed according to the value provided in the encoded data and the value of this dictionary entry is ignored. If the Adobe-defined marker code in the encoded data indicating the ColorTransform value is not present then the value specified in this dictionary entry will be used. If the Adobe-defined marker code (APP14) in the encoded data indicating the ColorTransform value is not present and this dictionary entry is not present in the filter dictionary then the default value of ColorTransform is 1 if the image has three components and 0 otherwise.
Parameters that control the decoding process as well as other metadata are embedded within the encoded data stream using a notation referred to as "markers". When Adobe Systems Incorporated defined the use of JPEG images within PostScript language data streams, Adobe defined a particular set of rules pertaining to which markers are to be recognised, which are to be ignored and which are considered errors. A specific Adobe-defined marker (X’FFEE, sometimes called ‘APPE’ or ‘APP14’) was also introduced. The exact rules for producing and consuming DCT encoded data within PostScript language are provided in Adobe Technical Note 5116 and PDF DCT encoding exactly follow all those rules established by Adobe for the PostScript language.

=end pod


