| Extracted from Pike v7.8 release 866 at 2018-07-18.

[Top]
Image
Image.TGA

# Method Image.TGA.encode()

Method encode

  `string encode(object image)`
  `string encode(object image, object mappingoptions)`

Description

  Encodes a Targa image.

  The `options` argument may be a mapping containing zero or more encoding options:

      normal options:
          "alpha":image object
              Use this image as alpha channel
              (Note: Targa alpha channel is grey.
               The values are calculated by (r+2g+b)/4.)

          "raw":1
              Do not RLE encode the image