diff --git a/src/share/classes/javax/imageio/metadata/doc-files/jpeg_metadata.html b/src/share/classes/javax/imageio/metadata/doc-files/jpeg_metadata.html index 721bdb2e702798a527903c7ec047d01b966ff48f..5d3b0ea5e7d573b247a6db56734d47bcd3e7bc1f 100644 --- a/src/share/classes/javax/imageio/metadata/doc-files/jpeg_metadata.html +++ b/src/share/classes/javax/imageio/metadata/doc-files/jpeg_metadata.html @@ -211,6 +211,20 @@ to any listeners.

+Optional ColorSpace support: +Handling of PhotoYCC (YCC), PhotoYCCA (YCCA), RGBA and YCbCrA color spaces +by the standard plugin, as described below, is dependent on capabilities +of the libraries used to interpret the JPEG data. Thus all consequential +behaviors are optional. If the support is not available when decoding, +the color space will be treated as unrecognized and the appropriate +default color space for the specified number of component channels +may be used. +When writing, an Exception may be thrown if no suitable conversion +can be applied before encoding. +But where the support for these color spaces is available, the behavior +must be as documented. +

+ When reading, the contents of the stream are interpreted by the usual JPEG conventions, as follows: @@ -241,8 +255,11 @@ JPEG conventions, as follows: 2-channel images are assumed to be grayscale with an alpha channel. For 3- and 4-channel images, the component ids are consulted. If these values are 1-3 for a 3-channel image, then the image is assumed to be - YCbCr. If these values are 1-4 for a 4-channel image, then the image - is assumed to be YCbCrA. If these values are > 4, they are checked + YCbCr. Subject to the availability of the + optional color space support + described above, if these values are 1-4 for a 4-channel image, + then the image is assumed to be YCbCrA. + If these values are > 4, they are checked against the ASCII codes for 'R', 'G', 'B', 'A', 'C', 'c'. These can encode the following colorspaces:

@@ -346,12 +363,16 @@ If no metadata object is specified, then the following defaults apply: component ids in the frame and scan headers are set to 1, 2, and 3. -

  • RGBA images are converted to YCbCrA, subsampled in the +
  • Subject to the optional library support + described above, + RGBA images are converted to YCbCrA, subsampled in the chrominance channels by half both vertically and horizontally, and written without any special marker segments. The component ids in the frame and scan headers are set to 1, 2, 3, and 4. -
  • PhotoYCC and YCCAimages are subsampled by half in the chrominance +
  • Subject to the optional library support + described above, + PhotoYCC and YCCAimages are subsampled by half in the chrominance channels both vertically and horizontally and written with an Adobe APP14 marker segment and 'Y','C', and 'c' (and 'A' if an alpha channel is present) as component ids in the frame @@ -433,6 +454,8 @@ in the frame header node of the metadata object, regardless of color space.)
  • RGBA images: + Subject to the optional library support + described above,
  • PhotoYCC Images: + Subject to the optional library support + described above,
  • PhotoYCCA Images: + Subject to the optional library support + described above,