PDF::Bu...e::TIFF(3)
π PDF::Builder::Resource::XObject::Image::TIFF(3) π
okay bestie, sit down, hydrate, because today we're talking about TIFF image support in PDF::Builder. yes, the manual page is literally called PDF::Builder::Resource::XObject::Image::TIFF and yes that is a mouthful, but she's iconic and she knows it. π
lowkey important: this class inherits from PDF::Builder::Resource::XObject::Image. so all that parent energy is flowing down into here. π§¬β¨
πΈ METHODS πΈ
β¨ new β¨
$res = PDF::Builder::Resource::XObject::Image::TIFF->new($pdf, $file, %opts)
bestie this is the constructor, the birth of your TIFF-image object. she returns a TIFF-image object, no cap. π¦
here's the tea tho: if the Graphics::TIFF package is installed, the TIFF_GT library gets used instead of the TIFF library. she picks the fancy one automatically, main character behavior honestly. but if you're in your stubborn era, you can force use of the TIFF library with the "nouseGT" flag β go peek at the Builder documentation for image_tiff() for the deets. ππ
Options:
'name' => 'string'β this is the name you can give your TIFF image object, like naming your pet. πΎ the default isIxnnnn.
π¨ reminder bestie: you need to use theBuilder.pmmethodimage_tiffin order to display a TIFF file. don't skip that step, it's giving required. π
π usesLib π
$mode = $tif->usesLib()
she tells you what's going on with the libraries. the vibes:
- returns
1ifGraphics::TIFFis installed and used β - returns
0if not installed β - returns
-1if installed but not used (aka thenouseGToption was given to"image_tiff") π
β οΈ Caution: this method can only be used after the image object has been created. it literally cannot tell you whetherGraphics::TIFFis available in advance of actually using it β which is a problem if you wanted to use some functionality that only exists inTIFF_GT. so if you need to know ahead of time, go look at the<PDF::Builder>LA_GT()call instead. periodt. π
π tiffTag π
$value = $tif->tiffTag($tag)
returns the value of the internal tiff-tag. she's a lil peek behind the curtain, iykyk. πβ¨
Useful Tags:
imageDescription, imageId (strings)
xRes, yRes (dpi; pixel/cm if resUnit==3)
resUnit
so imageDescription and imageId are strings π§΅, xRes and yRes are in dpi β but heads up, they're in pixel/cm if resUnit==3 π β and then there's resUnit doing her own thing.
okay that's the whole page bestie, you ate that. go build some TIFFs, slay, and remember: the TIFF library vs the TIFF_GT library is a whole personality trait. π«Ά
this lil gem is from perl v5.42.0, dated 2026-01-17, and it's part of the User Contributed Perl Documentation for PDF::Builder::Resource::XObject::Image::TIFF. bye pookie!! πππ
π¦ where this page comes from
- fedora 44: perl-PDF-Builder 3.028-2.fc44 Β· LGPL-2.1-or-later AND LGPL-2.1-only AND MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms