CTS logo
hazy blue Catskill Mountains in distance

A Thought…

Great minds discuss ideas; average minds discuss events; small minds discuss people.

   — modified from Henry Thomas Buckle

NAME

PDF::Builder::Resource::XObject::Image::TIFF_GT - TIFF image support (Graphics::TIFF enabled)

Inherits from PDF::Builder::Resource::XObject::Image

METHODS

new

    $res = PDF::Builder::Resource::XObject::Image::TIFF_GT->new($pdf, $file, %opts)
Returns a TIFF-image object. $pdf is the PDF object being added to, $file is the input TIFF file, and the optional $name of the new parent image object defaults to IxAAA.
If the Graphics::TIFF package is installed, and its use is not suppressed via the nouseGT flag (see Builder documentation for image_tiff), the TIFF_GT library will be used. Otherwise, the TIFF library will be used instead.
Options:
'notrans' => 1
Ignore any alpha layer (transparency) and make the image fully opaque.
'name' => 'string'
This is the name you can give for the TIFF image object. The default is Ixnnnn.
TIFF support (when using Graphics::TIFF) is for PhotometricInterpretation values of 0 (bilevel/gray, white is 0), 1 (bilevel/gray, black is 0), 2 (RGB), and 3 (Palette color). It currently does not support 4 (transparency mask), 5 (separated CMYK), 6 (YCbCr), 8 (CIELab), or higher. There is limited support for an Alpha (transparency) channel (due to extremely limited test cases). Some tags are not supported, and a PlanarConfiguration of 2 is unknown until we get some test cases.
Some applications seem to take odd liberties with TIFF tags, such as adding a SamplePerPixel without specifying ExtraSamples type. In such cases, we treat one extra sample (not otherwise defined) as an Alpha channel, and hope for the best!
If there are invalid tags or field values within a tag, the Graphics::TIFF library will attempt to pop-up a warning dialog, rather than just ignoring invalid things. If we can find a switch to disable this behavior, we will look into adding it as an option. According to Graphic::TIFF's owner (ticket RT 133955), this is coming directly from libtiff (as write to STDERR), so he can't do anything about it!

usesLib

    $mode = $tif->usesLib()
Returns 1 if Graphics::TIFF installed and used, 0 if not installed, or -1 if installed but not used (nouseGT option given to image_tiff).
Caution: this method can only be used after the image object has been created. It can't tell you whether Graphics::TIFF is available in advance of actually using it, in case you want to use some functionality available only in TIFF_GT. See the PDF::Builder LA_GT() call if you need to know in advance.

NAVIGATION LINKS

Up (Parents)

Master Index
PDF::Builder -- Facilitates the creation and modification of PDF files
PDF::Builder::Resource -- Base class for PDF resources
PDF::Builder::Resource::XObject -- Base class for external objects
PDF::Builder::Resource::XObject::Image -- Base class for external raster image objects

Siblings

PDF::Builder::Resource::XObject::Image::GD -- Support routines for Graphics Development image library
PDF::Builder::Resource::XObject::Image::GIF -- Support routines for GIF image library
PDF::Builder::Resource::XObject::Image::JPEG -- Support routines for JPEG image library
PDF::Builder::Resource::XObject::Image::PNG -- Support routines for PNG image library (using pure Perl code)
PDF::Builder::Resource::XObject::Image::PNG_IPL -- Support routines for PNG image library (using Image::PNG::Libpng)
PDF::Builder::Resource::XObject::Image::PNM -- Support routines for PNM (Portable aNy Map) image library
PDF::Builder::Resource::XObject::Image::TIFF -- TIFF image support

 

All content © copyright 2005 – 2024 by Catskill Technology Services, LLC.
All rights reserved.
Note that Third Party software (whether Open Source or proprietary) on this site remains under the copyright and license of its owners. Catskill Technology Services, LLC does not claim copyright over such software.

 

This page is https://www.catskilltech.com/Documentation/PDF/Builder/Resource/XObject/Image/TIFF_GT.html

Search Quotations database.

Last updated Sat, 09 Dec 2023 at 10:59 PM

Valid HTML 5

Tue, 12 Nov 2024 at 4:40 AM EST