.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "PDF::Builder::Resource::XObject::Image 3" .TH PDF::Builder::Resource::XObject::Image 3 2023-12-21 "perl v5.38.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME PDF::Builder::Resource::XObject::Image \- Base class for external raster image objects .SH METHODS .IX Header "METHODS" .SS new .IX Subsection "new" .Vb 1 \& $image = PDF::Builder::Resource::XObject::Image\->new($pdf, $name) .Ve .Sp .RS 4 Returns an image resource object. .RE .SS width .IX Subsection "width" .Vb 1 \& $width = $image\->width() .Ve .Sp .RS 4 Get the width (in points) of the image object. .Sp \&\fBNote\fR that this function also has the ability to \fIset\fR the width, by giving the new width (in points), but it appears that it never worked correctly. The \fIset\fR capability has been \fBdeprecated\fR, and is scheduled to be removed some time after October, 2025. If you are using the \f(CWwidth()\fR method in some manner to \fIset\fR the image width, please let us know, so we can plan to keep it enabled! .RE .SS height .IX Subsection "height" .Vb 1 \& $height = $image\->height() .Ve .Sp .RS 4 Get the height (in points) of the image object. .Sp \&\fBNote\fR that this function also has the ability to \fIset\fR the height, by giving the new height (in points), but it appears that it never worked correctly. The \fIset\fR capability has been \fBdeprecated\fR, and is scheduled to be removed some time after October, 2025. If you are using the \f(CWheight()\fR method in some manner to \fIset\fR the image height, please let us know, so we can plan to keep it enabled! .RE .SS smask .IX Subsection "smask" .Vb 1 \& $image\->smask($xobject) .Ve .Sp .RS 4 Set the soft-mask image object. .RE .SS mask .IX Subsection "mask" .Vb 1 \& $image\->mask(@color_range) \& \& $image\->mask($xobject) .Ve .Sp .RS 4 Set the mask to an image mask XObject or an array containing a range of colors to be applied as a color key mask. .RE .SS colorspace .IX Subsection "colorspace" .Vb 1 \& $image\->colorspace($name) \& \& $image\->colorspace($array) .Ve .Sp .RS 4 Set the color space used by the image. Depending on the color space, this will either be just the name of the color space, or it will be an array containing the color space and any required parameters. .Sp If passing an array, parameters must already be encoded as PDF objects. The array itself may also be a PDF object. If not, one will be created. .RE .SS bits_per_component .IX Subsection "bits_per_component" .Vb 1 \& $image\->bits_per_component($integer) .Ve .Sp .RS 4 Set the number of bits used to represent each color component. .RE