Glasswall Exported Image Metadata
    • PDF

    Glasswall Exported Image Metadata

    • PDF

    Article summary

    When operated in export mode Glasswall Rebuild outputs images embedded in PDF files in the form of a pair of files:

    • A file containing the raw image data.
    • A file containing metadata describing the format of the image.

    The metadata file takes the form of a JSON object containing the following Name/Value attribute pairs.

    Mandatory Attributes

    These values will be present for every image regardless of its format, usage, or encoding and will always be present regardless of the encoding scheme or colour space in use.

    Width

    An unsigned integer indicating the images width in pixels.

    Height

    An unsigned integer indicating the images height in pixels.

    Components

    An unsigned integer indicating the number of intensity values used to represent each pixel, for example a simple monochrome image would have a Components value of 1, an RGB encoded image would have a component value of 3, and a CMYK encoded image would have a component value of 4.

    BitsPerComponent

    An unsigned integer indicating the number of bits per colour component, for example a simple monochrome image would have a BitsPerComponent value of 1, a greyscale image encoded with 256 intensity levels would have a BitsPerComponent value of 8 as would an RGB image encoded with 24 bit colour resolution.

    Length

    An unsigned integer indicating the number of bytes of data expected in the image data stream.

    Optional Attributes

    In addition the metadata file may also contain the following optional Name/Value attribute pairs where additional data is required to describe the usage of and/or decode and accurately render the image.

    ImageMask

    A Boolean value indicating that the image is intended to be used as a mask to reveal or hide parts of another underlying image.

    Filter

    A string value indicating the encoding algorithm used. Available encoding algorithms are described in the discussion of stream filters in the PDF Specification (ISO32000-1, Section 7.4) and common values include CCITTFaxDecode, LZWDecode (Lempel-Zif-Welch compression, as used in for example the GIF format), DCTDecode (discrete cosine transformation compression, as used in JPEG), or FlateDecode (zlib deflate compression).

    DecodeParms

    A string value containing any additional parameters required by the decode algorithm to correctly decode the image data.

    JBIG2

    Global data segments to be used when processing JBIG2 encoded image data.type of colourspace

    Matte

    A boolean value indicating that the image is intended for use as a matte to form part of a composite image, eg by colour keying or alpha blending.

    Colour Space Attributes

    ColorSpaceFamily

    A string value indicating the type of colour space to be used if the image is to be rendered as intended as described in the PDF specification (ISO32000-1, Section 8.6). Colour spaces fall into three broad categories, device colour spaces, CIE-based colour spaces

    Device Colour Spaces.

    Simple colour spaces (DeviceGray, DeviceRGB, and DeviceCMYK) require no further description and indicate that image sample (pixel) values can be used directly.

    CIE-based Colour Spaces

    CIE-based colour spaces shall be based on an international standard for colour specification created by the Commission Internationale de l’Éclairage (International Commission on Illumination). These spaces specify colours in a way that is independent of the characteristics of any particular output device. Colour space families in this category include CalGray, CalRGB, Lab, and ICCBased. Currently only ICC based colour spaces (ColorSpaceFamily ICCBased) are supported, and, in this case the following attributes will be present.

    ColorSpaceIccProfileData
    A string value containing the ICC cross platform colour profile in ICC standard format. because this is an arbitary byte sequence it is presented in Base64 encoding in order to restrict it to be represented within a JSON string value.

    ColorSpaceAlternate
    A string value indicating an alternative colorspace which may be used to render the image if ICC based output is not supported.

    Indexed Colour Spaces

    Indexed colour spaces (ColorSpaceFamily value of Indexed) represent each pixel (or sample) value using a single value which is as an index into a table containing the actual output value, or set of values, the number of values in the lookup table will correspond to a base color space, so for exaple, using a base colour space of DeviceRGB each entry in the lookup table will contain 3 values. Lookup table entries will be presented in a single array with colour components occurring sequentially. For an index colour space the following attributes will be present.

    ColorSpaceBaseFamily
    A string value indicating the colour space used for indexed lookup values.

    ColorSpaceBaseComponents
    An unsigned integer indicating the number of components in the base colour space and hence the number of values in each entry in the indexed colour space lookup table.

    ColorSpaceIccProfileData
    ICC based colour space profile data for an ICC based base colour space - only present if ColorSpaceBaseFamily has the value ICCBased.

    ColorSpaceLookupData
    An array of unsigned integers containing the lookup table for the indexed colour space.


    Was this article helpful?