---
name: "PDF::Builder::Resource::XObject::Image::GIF"
section: "3pm"
platform: "linux"
package: "perl-pdf-builder"
version: "3.028-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/PDF::Builder::Resource::XObject::Image::GIF"
---

# PDF::Builder::Resource::XObject::Image::GIF(3pm)

Support routines for GIF image library Inherits from PDF::Builder::Resource::XObject::Image

## NAME

PDF::Builder::Resource::XObject::Image::GIF - Support routines for GIF image library

Inherits from PDF::Builder::Resource::XObject::Image

### History

GIF89a Specification: https://www.w3.org/Graphics/GIF/spec-gif89a.txt

A fairly thorough description of the GIF format may be found in  \<http://giflib.sourceforge.net/whatsinagif/bits\_and\_bytes.html\>.

Code originally from PDF::Create, PDF::Image::GIFImage - GIF image support Author: Michael Gross \<mdgrosse@sboxtugraz.at\>

## Supported Formats

GIF87a and GIF89a headers are supported. The Image block (x2C) is supported.

The Graphic Control Extension block (x21 + xF9) is supported for transparency  control. Animation is not supported.

The Comment Extension block (x21 + xFE), Plain Text Extension block (x21 + x01), and Application Extension block (x21 + xFF) are read, but ignored. Any other block or Extension block will be flagged as an error.

If given, Local Color Tables are read and used, supposedly permitting more  than 256 colors to be used overall in the image (despite the 8 bit color table depth).

### Options

- notrans

  When defined and not 0, `"notrans"` suppresses the use of transparency if such is defined in the GIF file.

- name =\> 'string'

  This is the name you can give for the GIF image object. The default is Gxnnnn.

- multi

  When defined and not 0, `"multi"` continues processing past the end of the  first Image Block. The old behavior, which is now the default, is to stop  processing at the end of the first Image Block.

## METHODS

### new

```
     PDF::Builder::Resource::XObject::Image::GIF->new()
```

Create an image object from a GIF input file. Remember that this should be invoked via the Builder.pm method!
