Image

[Raku PDF Project] / [PDF-Content Module] / PDF::Content :: Image

class PDF::Content::Image

loading and manipulation of PDF images

Synopsis

use PDF::Content::Image;
my PDF::Content::Image $image .= open: "t/images/lightbulb.gif";
say "image has size {$image.width} X {$image.height}";
say $image.data-uri;
# data:image/gif;base64,R0lGODlhEwATAMQA...

Description

This class currently supports image formats: PNG, GIF and JPEG.

head2Methods

multi method load

multi method load(
    Str $data-uri where { ... }
) returns PDF::Content::Image

load an image from a data URI string

multi method load

multi method load(
    IO::Path(Any) $iop
) returns PDF::Content::Image

load an image from a path

multi method load

multi method load(
    IO::Handle $source
) returns PDF::Content::Image

load an image from an IO handle

method data-uri

method data-uri() returns PDF::Content::Image::DataURI

Get or set the data URI from an image

PDF::Content v0.9.11

PDF content related classes; including text, images, fonts and graphics

Authors

  • David Warring

License

Artistic-2.0

Dependencies

Base64::NativeColorCompress::Zlib::RawFont::AFM:ver<1.24.10+>Native::PackingMethod::AlsoJSON::FastPDF:ver<0.6.8+>PDF::Grammar:ver<0.3.2+>

Test Dependencies

Provides

  • PDF::Content
  • PDF::Content::API
  • PDF::Content::Canvas
  • PDF::Content::Color
  • PDF::Content::Font
  • PDF::Content::Font::CoreFont
  • PDF::Content::Font::Enc::Glyphic
  • PDF::Content::Font::Enc::Type1
  • PDF::Content::Font::Encoder
  • PDF::Content::Font::Encodings
  • PDF::Content::FontObj
  • PDF::Content::Image
  • PDF::Content::Image::GIF
  • PDF::Content::Image::JPEG
  • PDF::Content::Image::PDF
  • PDF::Content::Image::PNG
  • PDF::Content::Interface
  • PDF::Content::Matrix
  • PDF::Content::Ops
  • PDF::Content::Page
  • PDF::Content::PageNode
  • PDF::Content::PageTree
  • PDF::Content::ResourceDict
  • PDF::Content::Resourced
  • PDF::Content::Tag
  • PDF::Content::Text::Block
  • PDF::Content::Text::Box
  • PDF::Content::Text::Line
  • PDF::Content::Text::Style
  • PDF::Content::XObject
  • X::PDF::Content

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.

Built with Podlite — the markup and publishing tools behind this site.