{
    "mode": "perldoc",
    "parameter": "PDF::API2::Resource::XObject::Image",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/PDF%3A%3AAPI2%3A%3AResource%3A%3AXObject%3A%3AImage/json",
    "generated": "2026-06-05T10:11:39Z",
    "sections": {
        "NAME": {
            "content": "PDF::API2::Resource::XObject::Image - Base class for external raster image objects\n",
            "subsections": []
        },
        "METHODS": {
            "content": "$image = PDF::API2::Resource::XObject::Image->new($pdf, $name)\nReturns an image resource object.\n\n$width = $image->width($width)\nGet or set the width value for the image object.\n\n$height = $image->height($height)\nGet or set the height value for the image object.\n\n$image->smask($xobject)\nSet the soft-mask image object.\n\n$image->mask(@colorrange)\n$image->mask($xobject)\nSet the mask to an image mask XObject or an array containing a range of colors to be applied\nas a color key mask.\n\n$image->colorspace($name)\n$image->colorspace($array)\nSet the color space used by the image. Depending on the color space, this will either be\njust the name of the color space, or it will be an array containing the color space and any\nrequired parameters.\n\nIf passing an array, parameters must already be encoded as PDF objects. The array itself may\nalso be a PDF object. If not, one will be created.\n\n$image->bitspercomponent($integer)\nSet the number of bits used to represent each color component.\n",
            "subsections": []
        }
    },
    "summary": "PDF::API2::Resource::XObject::Image - Base class for external raster image objects",
    "flags": [],
    "examples": [],
    "see_also": []
}