GraphicsFormats REALbasic Plugin

TgaImporter Class

A class to Import Pictures from a TGA (Targa) format. The picture can be imported from a File, string or IBinaryStreamReader.

Tga format is loss less file format and supports alpha channels.

Object
   TgaImporter

class TgaImporter implements

IGraphicsImporter

Properties

ErrorMessageFor some errors then further detail may come in text, if there is more detail then this property will contain the extra detail as text.
LastErrorCode for last error that occurred
ProgressHandlerTo get progress feedback then assign a a class instance that implements the IProgressHandler interface to this property.
RLECompressedReturns true if the image that was imported was RLE compressed, else false.

Methods

OpenFromFileOpens a Tga Image from a file.
OpenFromStreamOpens a Tga Image from a IBinaryStreamWriter.
OpenFromStringOpens a Tga Image from a String.

Examples

Examples:

The following example imports a tga file.

Dim tga as TGAImporter

tga = new TGAImporter()

myPicture = tga.OpenFromFile(f)

Supported Platforms:

  • MacOS X PPC - (Mach-O)
  • MacOS X Universal Binary (Mach-O)
  • MacOS X Cocoa Universal Binary (Mach-O)
  • Win32 - Windows
  • Linux x86

    Unsupported Platforms: