CTS logo
hazy blue Catskill Mountains in distance

News:

Online documentation and examples output are now available for our products


A Thought…

No matter how much cats fight, there always seems to be plenty of kittens.

   — Abraham Lincoln

NAME

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

METHODS

$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!

$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. Inherit from PDF::Builder::Basic::PDF::Dict
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. Inherits from PDF::Builder::Resource::XObject::Image
PDF::Builder::Resource::XObject::Image::GIF -- support routines for GIF image library. Inherits from PDF::Builder::Resource::XObject::Image
PDF::Builder::Resource::XObject::Image::JPEG -- support routines for JPEG image library. Inherits from PDF::Builder::Resource::XObject::Image
PDF::Builder::Resource::XObject::Image::PNG -- support routines for PNG image library (using pure Perl code). Inherits from PDF::Builder::Resource::XObject::Image
PDF::Builder::Resource::XObject::Image::PNG_IPL -- support routines for PNG image library (using Image::PNG::Libpng). Inherits from PDF::Builder::Resource::XObject::Image
PDF::Builder::Resource::XObject::Image::PNM -- support routines for PNM (Portable aNy Map) image library. Inherits from PDF::Builder::Resource::XObject::Image
PDF::Builder::Resource::XObject::Image::TIFF -- TIFF image support

 

All content © copyright 2005 – 2023 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 Wed, 08 Nov 2023 at 11:26 PM

Valid HTML 5

Thu, 30 Nov 2023 at 12:54 AM EST