--- old/src/java.desktop/share/classes/javax/imageio/metadata/doc-files/tiff_metadata.html 2017-10-23 13:51:09.000000000 -0700 +++ new/src/java.desktop/share/classes/javax/imageio/metadata/doc-files/tiff_metadata.html 2017-10-23 13:51:09.000000000 -0700 @@ -1,8 +1,11 @@ - - + +
+ +
-Reading Images
-
+Reading Images
-
Writing Images
-
-
Native Stream Metadata Format
Native Image Metadata Format
-
If the source image data have photometric type CIE L*a*b* or YCbCr, and the destination color space type is RGB, then the source image data will be automatically converted to RGB using an internal color converter.
-The normalized color coordinate transformations +
The normalized color coordinate transformations used for the default CMYK color space are defined as follows:
The generic color space used when no other color space +
The generic color space used when no other color space can be inferred is provided merely to enable the data to be loaded. It is not intended to provide accurate conversions of any kind.
@@ -171,7 +154,7 @@ supplied to the reader and should be derived from a color space which is correct for the data in question. -ImageReadParam.setDestinationType
.
read
method.If the inferred color space not based on the ICC Profile field is compatible with the ICC profile-based color space, then a second @@ -214,7 +196,7 @@ more than one type, the first one will be based on the ICC profile and the second on the inferred color space.
-TIFFDirectory.createFromMetadata
method.
-
Standard Metadata Element | @@ -261,9 +242,9 @@||
---|---|---|
/Chroma/ColorSpaceType@name | PhotometricInterpretation: WhiteIsZero, BlackIsZero, TransparencyMask = -"GRAY"; RGB, PaletteColor => "RGB"; CMYK => "CMYK"; -YCbCr => "YCbCr"; -CIELab, ICCLab => "Lab". | +"GRAY"; RGB, PaletteColor => "RGB"; CMYK => "CMYK"; +YCbCr => "YCbCr"; +CIELab, ICCLab => "Lab".|
/Chroma/NumChannels@value | @@ -271,7 +252,7 @@||
/Chroma/BlackIsZero@value | -"TRUE" <=> PhotometricInterpretation => WhiteIsZero | +"TRUE" <=> PhotometricInterpretation => WhiteIsZero |
/Chroma/Palette | @@ -279,28 +260,28 @@||
/Compression/CompressionTypeName@value | -Compression: Uncompressed => "none"; CCITT 1D => "CCITT + | Compression: Uncompressed => "none"; CCITT 1D => "CCITT RLE"; -Group 3 Fax => "CCITT T.4"; Group 4 Fax => "CCITT T.6"; -LZW => "LZW"; -JPEG => "Old JPEG"; New JPEG => "JPEG"; Zlib =>> "ZLib"; PackBits => +Group 3 Fax => "CCITT T.4"; Group 4 Fax => "CCITT T.6"; +LZW => "LZW"; +JPEG => "Old JPEG"; New JPEG => "JPEG"; Zlib =>> "ZLib"; PackBits => "PackBits"; -Deflate => "Deflate"; Exif JPEG => "JPEG". | +Deflate => "Deflate"; Exif JPEG => "JPEG".
/Compression/Lossless@value | -Compression: JPEG or New JPEG => "FALSE"; otherwise "TRUE". | +Compression: JPEG or New JPEG => "FALSE"; otherwise "TRUE". |
/Data/PlanarConfiguration@value | -Chunky => "PixelInterleaved"; Planar => "PlaneInterleaved". | +Chunky => "PixelInterleaved"; Planar => "PlaneInterleaved". |
/Data/SampleFormat@value | -PhotometricInterpretation PaletteColor => "Index"; -SampleFormat unsigned integer data => "UnsignedIntegral"; -SampleFormat two's complement signed integer data => "SignedIntegral"; -SampleFormat IEEE floating point data => "Real"; + | PhotometricInterpretation PaletteColor => "Index"; +SampleFormat unsigned integer data => "UnsignedIntegral"; +SampleFormat two's complement signed integer data => "SignedIntegral"; +SampleFormat IEEE floating point data => "Real"; otherwise element not emitted. |
/Data/SampleMSB@value | -FillOrder: left-to-right => space-separated list of BitsPerSample-1; -right-to-left => space-separated list of 0s. | +FillOrder: left-to-right => space-separated list of BitsPerSample-1; +right-to-left => space-separated list of 0s. |
/Dimension/PixelAspectRatio@value | @@ -343,9 +324,9 @@||
/Document/SubimageInterpretation@value | -NewSubFileType: transparency => "TransparencyMask"; -reduced-resolution => "ReducedResolution"; -single page => "SinglePage". | +NewSubFileType: transparency => "TransparencyMask"; +reduced-resolution => "ReducedResolution"; +single page => "SinglePage". |
/Document/ImageCreationTime@value | @@ -357,24 +338,23 @@ Artist, HostComputer, InkNames, Copyright: /Text/TextEntry@keyword = field name, /Text/TextEntry@value = field value.||
/Transparency/Alpha@value | -ExtraSamples: associated alpha => "premultiplied"; -unassociated alpha => "nonpremultiplied". | +ExtraSamples: associated alpha => "premultiplied"; +unassociated alpha => "nonpremultiplied". |
APP1
marker segment of a compressed Exif image.
-tiffReader.hasThumbnails(0)
will return false
.
-APP1
marker segment. The parameters of the marker
segment after the length are the 6-byte sequence
-{'E', 'x', 'i', 'f', 0x00, 0x00}
+{'E', 'x', 'i', 'f', 0x00, 0x00}
followed by a complete TIFF stream. The embedded TIFF stream contains a primary
IFD describing the JPEG image optionally followed by a thumbnail IFD and
compressed or uncompressed thumbnail image data. Note that the embedded TIFF
@@ -419,12 +399,12 @@
nor any descriptive fields which duplicate information found in the JPEG
stream itself.
-The parameter content of the APP1 marker segment may be obtained +
The parameter content of the APP1
marker segment may be obtained
from the user object of the associated Node
in a
-javax_imageio_jpeg_image_1.0 native image metadata tree extracted
+javax_imageio_jpeg_image_1.0
native image metadata tree extracted
from the image metadata object returned by the JPEG reader. This APP1 Exif
node will be a child of the node named "markerSequence" and will
-have name unknown and an attribute named MarkerTag with
+have name unknown
and an attribute named MarkerTag
with
integral value 0xE1
(String
value
"225"
). The user object of this node will be a byte array
which starts with the six bytes {'E', 'x', 'i', 'f', '0', '0'}
.
@@ -472,9 +452,8 @@
images. Calling tiffReader.read(0, readParam)
will throw
an exception as the primary image in the embedded TIFF stream is always
empty; the primary image should be obtained using the JPEG reader itself.
-
getDefaultWriteParam()
method of the TIFF ImageWriter
,
the canWriteTiles()
and canWriteCompressed()
methods
will return true
; the canOffsetTiles()
and
-canWriteProgressive()
methods will return false
.
+canWriteProgressive()
methods will return false
.
The TIFF writer supports many optional capabilities including writing tiled
images, inserting images, writing or inserting empty images, and replacing image
@@ -497,12 +476,12 @@
compression is being used and strips are being written, the number of
rows per strip is rounded to a multiple of 8 times the maximum MCU over
both dimensions.
-
+
-setCompressionType()
method of
the ImageWriteParam
after setting the compression mode to
@@ -594,21 +573,21 @@
If ZLib/Deflate or JPEG compression is used, the compression quality
may be set. For ZLib/Deflate the supplied floating point quality value is
-rescaled to the range [1, 9] and truncated to an integer
+rescaled to the range [1, 9]
and truncated to an integer
to derive the Deflate compression level. For JPEG the floating point
quality value is passed directly to the JPEG writer plug-in which
interprets it in the usual way.
If the source image data color space type is RGB, and the destination photometric type is CIE L*a*b* or YCbCr, then the source image data will be automatically converted from RGB using an internal color converter.
-ICC Profile
field will be written if either:
ImageTypeSpecifier
is an instance of
ICC_ColorSpace
which is not one of the standard
-color spaces defined by the CS_* constants in the
+color spaces defined by the CS_*
constants in the
ColorSpace
class. The destination type is set via
ImageWriteParam.setDestinationType(ImageTypeSpecifier)
and defaults
to the ImageTypeSpecifier
of the image being written.
For bilevel images, the FillOrder, and T4Options +
For bilevel images, the FillOrder
, and T4Options
fields affect the output data. The data will be filled right-to-left if
-FillOrder is present with a value of 2
+FillOrder
is present with a value of 2
(BaselineTIFFTagSet.FILL_ORDER_RIGHT_TO_LEFT
)
-and will be filled left-to-right otherwise. The value of T4Options
+and will be filled left-to-right otherwise. The value of T4Options
specifies whether the data should be 1D- or 2D-encoded and whether EOL
padding should be used.
For all images the value of the RowsPerStrip field is used +
For all images the value of the RowsPerStrip
field is used
to the set the number of rows per strip if the image is not tiled. The
default number of rows per strip is either 8 or the number of rows which
would fill no more than 8 kilobytes, whichever is larger.
For all images the tile dimensions may be set using the TileWidth -and TileLength field values if the tiling mode is +
For all images the tile dimensions may be set using the TileWidth
+and TileLength
field values if the tiling mode is
ImageWriteParam.MODE_COPY_FROM_METADATA
. If this mode
is set but the fields are not, their respective default values are the image
width and height.
When using JPEG-in-TIFF compression, a JPEGTables field will be +
When using JPEG-in-TIFF compression, a JPEGTables
field will be
written to the IFD and abbreviated JPEG streams to each strip or tile if and
-only if a JPEGTables field is contained in the metadata object
-provided to the writer. If the contents of the JPEGTables field is
+only if a JPEGTables
field is contained in the metadata object
+provided to the writer. If the contents of the JPEGTables
field is
a valid tables-only JPEG stream, then it will be used; otherwise the contents
of the field will be replaced with default visually lossless tables. If no
-such JPEGTables field is present in the metadata, then no
-JPEGTables field will be written to the output and each strip or
+such JPEGTables
field is present in the metadata, then no
+JPEGTables
field will be written to the output and each strip or
tile will be written as a separate, self-contained JPEG stream.
When using Deflate/ZLib or LZW compression, if the image has 8 bits per
sample, a horizontal differencing predictor will be used if the
-Predictor field is present with a value of 2
+Predictor
field is present with a value of 2
(BaselineTIFFTagSet.PREDICTOR_HORIZONTAL_DIFFERENCING
).
If prediction is so requested but the image does not have
8 bits per sample the field will be reset to have the value 1
@@ -669,30 +648,30 @@
Some fields may be added or modified:
PhotometricInterpretation
if not present.PlanarConfiguration
if this field is present with value
+Planar
is is reset to Chunky
.Compression
always.BitsPerSample
if the image is not bilevel.SamplesPerPixel
always.ExtraSamples
if an alpha channel is present.SampleFormat
if not present and the data are 16- or 32-bit
integers or floating point.ColorMap
if the PhotometricInterpretation
is
+RGBPalette
.ImageWidth
and ImageLength
always.TileWidth
, TileLength
, TileOffsets
, and
+TileByteCounts
if a tiled image is being written.RowsPerStrip
, StripOffsets
, and StripByteCounts
if a tiled image is not being written.XResolution
, YResolution
, and ResolutionUnit
if none of these is present.YCbCrSubsampling
and YCbCrPositioning
if the
photometric interpretation is YCbCr and the compression type is not JPEG
(only [1, 1] subsampling and cosited positioning are supported for
non-JPEG YCbCr output).YCbCrSubsampling
, YCbCrPositioning
, and
+ReferenceBlackWhite
: if the compression type is JPEG and the color
space is RGB these will be reset to [2, 2] centered subsampling with no
headroom/footroom (0:255,128:255,128:255).Some fields may be removed:
BitsPerSample
if the image is bilevel.ExtraSamples
if the image does not have an alpha channel.ColorMap
if the photometric interpretation is not
+RGBPalette
.TileWidth
, TileLength
, TileOffsets
, and
+TileByteCounts
if tiling is not being used.RowsPerStrip
, StripOffsets
, and StripByteCounts
if tiling is being used.YCbCrSubsampling
, YCbCrPositioning
, and
+ReferenceBlackWhite
if the compression type is JPEG and the
color space is grayscale.JPEGProc
, JPEGInterchangeFormat
,
+JPEGInterchangeFormatLength
, JPEGRestartInterval
,
+JPEGLosslessPredictors
, JPEGPointTransforms
,
+JPEGQTables
, JPEGDCTables
, and
+JPEGACTables
if the compression type is JPEG.Other fields present in the supplied metadata are uninterpreted and will be written as supplied.
@@ -737,7 +715,7 @@IIOMetadata
object so obtained may then be passed to the TIFF
writer.
-
TIFF Field | @@ -756,10 +733,10 @@ PhotometricInterpretation/Chroma/ColorSpaceType@name: "GRAY" and /Chroma/BlackIsZero@value = "FALSE" -=> WhiteIsZero; "GRAY" and /Document/SubimageInterpretation@value = -"TransparencyMask" => TransparencyMask; "RGB" and /Chroma/Palette present => -PaletteColor; "GRAY" => BlackIsZero; "RGB" => RGB; "YCbCr" => YCbCr; -"CMYK" => CMYK; "Lab" => CIELab. | +=> WhiteIsZero; "GRAY" and /Document/SubimageInterpretation@value = +"TransparencyMask" => TransparencyMask; "RGB" and /Chroma/Palette present => +PaletteColor; "GRAY" => BlackIsZero; "RGB" => RGB; "YCbCr" => YCbCr; +"CMYK" => CMYK; "Lab" => CIELab.|
---|---|---|
SamplesPerPixel | @@ -771,21 +748,21 @@||
Compression | -/Compression/CompressionTypeName@value: "none" => Uncompressed; -"CCITT RLE" => CCITT 1D; "CCITT T.4" => Group 3 Fax; "CCITT T.6" => Group 4 -Fax; "LZW" => LZW; "Old JPEG" => JPEG; "JPEG" => New JPEG; "ZLib" => ZLib; -"PackBits" => PackBits; "Deflate" => Deflate. | +/Compression/CompressionTypeName@value: "none" => Uncompressed; +"CCITT RLE" => CCITT 1D; "CCITT T.4" => Group 3 Fax; "CCITT T.6" => Group 4 +Fax; "LZW" => LZW; "Old JPEG" => JPEG; "JPEG" => New JPEG; "ZLib" => ZLib; +"PackBits" => PackBits; "Deflate" => Deflate. |
PlanarConfiguration | -/Data/PlanarConfiguration@value: "PixelInterleaved" => Chunky; -"PlaneInterleaved" => Planar. | +/Data/PlanarConfiguration@value: "PixelInterleaved" => Chunky; +"PlaneInterleaved" => Planar. |
SampleFormat | -/Data/SampleFormat@value: "SignedIntegral" => two's complement signed -integer data; "UnsignedIntegral" => unsigned integer data; "Real" => -IEEE floating point data; "Index" => unsigned integer data. + | /Data/SampleFormat@value: "SignedIntegral" => two's complement signed +integer data; "UnsignedIntegral" => unsigned integer data; "Real" => +IEEE floating point data; "Index" => unsigned integer data. |
FillOrder | -/Data/SampleMSB@value: if all values in space-separated list are 0s => -right-to-left; otherwise => left-to-right. + | /Data/SampleMSB@value: if all values in space-separated list are 0s => +right-to-left; otherwise => left-to-right. |
NewSubFileType | -/Document/SubimageInterpretation@value: "TransparencyMask" => -transparency mask; "ReducedResolution" => reduced-resolution; -"SinglePage" => single page. | +/Document/SubimageInterpretation@value: "TransparencyMask" => +transparency mask; "ReducedResolution" => reduced-resolution; +"SinglePage" => single page. |
DateTime | @@ -845,29 +822,28 @@||
ExtraSamples | -/Transparency/Alpha@value: "premultiplied" => associated alpha, count 1; -"nonpremultiplied" => unassociated alpha, count 1. | +/Transparency/Alpha@value: "premultiplied" => associated alpha, count 1; +"nonpremultiplied" => unassociated alpha, count 1. |
APP1
marker segment of a compressed Exif image.
-APP1
segment of a
compressed Exif image is identical to the
uncompressed Exif image structure except that there are no primary
image data, i.e., the primary IFD does not refer to any image data.
@@ -1015,7 +991,7 @@
Node tree = jpegImageMetadata.getAsTree(nativeFormat);
NodeList children = tree.getChildNodes();
int numChildren = children.getLength();
- for (int i = 0; i < numChildren; i++) {
+ for (int i = 0; i < numChildren; i++) {
Node child = children.item(i);
if (child.getNodeName().equals("markerSequence")) {
child.appendChild(app1Node);
@@ -1034,7 +1010,7 @@
and written to the JPEG stream when the primary image is written using
the JPEG writer.
-