PDF::AP...t::Image(3)

✨ NAME ✨

PDF::API2::Resource::XObject::Image β€” bestie, this is the base class for external raster image objects πŸ–ΌοΈπŸ’–

(and yes, this page lives in the PDF::API2::Resource::XObject::Image part of the manual, it's giving very "3" of you to ask πŸ’…)


πŸŽ€ METHODS πŸŽ€

okay so here's the whole roster, no skips, we're reading the entire group chat 🫢

  • $image = PDF::API2::Resource::XObject::Image->new($pdf, $name) β€” hands you back an image resource object. that's it, that's the whole thing. iconic behavior ✨
  • $width = $image->width($width) β€” get the width value for the image object, or set it. your call, main character 🌸
  • $height = $image->height($height) β€” same energy but vertical: get or set the height value for the image object πŸ¦‹
  • $image->smask($xobject) β€” sets the soft-mask image object. soft, like your heart πŸ₯ΉπŸ’œ
  • $image->mask(@color_range)
  • $image->mask($xobject) β€” sets the mask to an image mask XObject, or to an array holding a range of colors to be applied as a color key mask. two paths, both valid, pick your fighter πŸ’…
  • $image->colorspace($name)
  • $image->colorspace($array) β€” sets the color space used by the image. depending on which color space it is, this will either be just the name of the color space, or it will be an array containing the color space plus any required parameters.
    • > heads up bestie: if you're passing an array, the parameters must already be encoded as PDF objects. the array itself may also be a PDF object β€” and if it isn't one, one will be created for you. no cap πŸ”₯
  • $image->bits_per_component($integer) β€” sets the number of bits used to represent each color component. bit by bit, we love to see it ⭐

and that's the whole page, periodt πŸ’– this beauty came to you courtesy of perl v5.42.0, dated 2025-09-01, and it's a User Contributed Perl Documentation situation. go forth and rasterize responsibly 🧚🌈

πŸ“¦ where this page comes from
  • fedora 43: perl-PDF-API2 2.048-1.fc43 Β· LGPL-2.1-or-later AND (GPL-1.0-or-later OR Artistic-1.0-Perl) AND (MIT OR Artistic-1.0-Perl)
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms