eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'TargaReader':

Home

everywhere
www.exept.de
for:
[back]

Class: TargaReader


Inheritance:

   Object
   |
   +--ImageReader
      |
      +--TargaReader

Package:
stx:libview2
Category:
Graphics-Images-Readers
Version:
rev: 1.25 date: 2003-11-19 15:38:53
user: cg
file: TargaReader.st directory: libview2
module: stx stc-classLibrary: libview2

Description:


this class provides methods for loading targa-file (tga) images.

Limitations: 
    not fully tested (I only had a few targa files to check things)
    only supports 8,24 and 32 bits/pixel formats; alpha channel is ignored
    Image saving not supported

I had two tga files to test this code with - it may not work with
other targa files (it certainly does not work with 1/16 bit images).

Suggestions: adapt & use the pbmplus library here.


Related information:

    Image
    Form
    Icon
    BlitImageReader
    FaceReader
    GIFReader
    JPEGReader
    PBMReader
    PCXReader
    ST80FormReader
    SunRasterReader
    TIFFReader
    WindowsIconReader
    XBMReader
    XPMReader
    XWDReader

Class protocol:

initialization
o  initialize
tell Image-class, that a new fileReader is present
for the '.tga' extension.

testing
o  isValidImageFile: aFileName
return true, if aFileName contains a targa-file image


Instance protocol:

private-reading
o  handleImageOrientation

o  read24
read a 24 bit/pixel targa-image

o  read24RLE
read an 8 bit/pixel rle encoded targa-image

o  read32
read a 32 bit/pixel targa-image; skip alpha channel (for now)

o  read32RLE
read a 32 bit/pixel rle encoded targa-image; skip alpha channel (for now)

o  read8
read an 8 bit/pixel targa-image

o  read8RLE
read an 8 bit/pixel rle encoded targa-image

o  readColorMap: cmapLength

reading
o  readImage
read a targa-image from aFileName. return the receiver (with all
relevant instance variables set for the image) or nil on error



ST/X 6.1.1; WebServer 1.620 at exept:8081; Wed, 23 May 2012 21:25:36 GMT