GraphicEx introduction

GraphicEx is an addendum to Delphi's Graphics.pas in order to enable your application to load many common image formats. This library is primarily designed to load images as background (buttons, forms, toolbars) and textures (DirectX, OpenGL) or for image browsing and editing purposes as long as you don't need to save images. Currently only TTargaGraphic also supports saving an image.

GraphicEx is open source under the Mozilla Public License (MPL). Please read the license agreement before you start using this library.

  • TIFF images (*.tif; *.tiff), extended base line implementation
    • byte orders: little endian, big endian
    • sample sizes: 1, 2, 4, 8, 16 bits per sample
    • color spaces: indexed, grayscale, RGB(A), CMYK, L*a*b*
    • compression formats: uncompressed, packed bits, LZW, CCITT T.4 (raw and modified fax group 3, possibly word aligned), ThunderScan, Deflate, new style JPEG
  • GFI fax images (*.fax), uses TTIFFGraphic to read
    • sample size: 1 bits per sample
    • color space: indexed
    • compression format: CCITT T.4 (raw and modified fax group 3)
  • SGI images (*.bw, *.rgb, *.rgba, *.sgi)
    • byte order: big endian
    • sample sizes: 1, 2, 4, 8, 16 bits per sample
    • color spaces: indexed, grayscale, RGB(A)
    • compression formats: uncompressed, RLE
  • Autodesk images files (*.cel; *.pic) old style only
    • byte order: little endian
    • sample size: 8 bits per sample
    • color spaces: indexed
    • compression format: uncompressed
  • Truevision images (*.tga; *.vst; *.icb; *.vda; *.win), write support included
    • byte order: little endian
    • sample sizes: 5, 8 bits per sample
    • color spaces: gray scale, indexed, 15 bits RGB (555), 24 bits RGB(A)(888)
    • compression formats: uncompressed, RLE
  • ZSoft Paintbrush images (*.pcx, *.pcc)
    • byte order: little endian
    • sample sizes: 1, 2, 4, 8 bits per sample
    • color spaces: gray scale, indexed, RGB
    • compression formats: uncompressed, RLE
  • Word 5.x screen capture files (*.scr)
    • byte order: little endian
    • sample sizes: 1, 2, 4, 8 bits per sample
    • color spaces: indexed, gray scaleRGB
    • compression formats: uncompressed, RLE
  • Kodak Photo-CD images (*.pcd)
    • byte order: little endian
    • samples size: 8 bits per sample
    • color space: YCbCr
    • compression: PCD Huffmann
    • specials:
      • sizes: all resolutions, from 192 x 128 up to 6144 x 4096 (64 Base vaporware)
      • rotated: clockwise and counter-clockwise
  • Portable pixel/gray map images (*.ppm, *.pgm, *.pbm)
    • byte order: little endian
    • sample sizes: 1, 8 bits per sample
    • color spaces: gray scale, indexed, RGB
    • compression format: uncompressed
    • specials:
      • ASCII and Binary format
  • Dr. Halo images (*.cut, *.pal)
    • byte order: little endian
    • sample size: 8 bits per sample
    • color spaces: indexed
    • compression formats: RLE
    • special:
      • external palette file (*.pal) is automatically loaded when specified while doing LoadFromStream or when loading the image via LoadFromFile
  • CompuServe images (*.gif)
    • byte order: little endian
    • sample sizes: 1, 4, 8 bits per sample
    • color spaces: indexed
    • compression format: LZW
    • special:
      • interlaced, non-interlaced
  • SGI Wavefront images (*.rla, *.rpf)
    • byte order: big endian
    • sample size: 8 bits per sample
    • color space: RGB(A)
    • compression formats: RLE
  • Standard Windows bitmap images (*.bmp, *.rle, *.dib), these formats are natively supported by Delphi's VCL but *.rle and *.dib files are not registered with TPicture by default
    • byte order: little endian
    • sample sizes: 1, 4, 8 bits per sample
    • color spaces: indexed, RGB(A)
    • compression formats: uncompressed, RLE
    • specials:
      • OS/2 bitmap format
  • Photoshop images (*.psd, *.pdd)
    • byte order: big endian
    • sample sizes: 1, 8, 16 bits per sample
    • color spaces: indexed, RGB, CMYK, CIE L*a*b*
    • compression formats: uncompressed, packed bits
    • special:
      • duo tone
  • Paintshop Pro images (*.psp)
    • byte order: little endian
    • sample sizes: 1, 4, 8 bits per sample
    • color spaces: indexed, gray scale, RGB
    • compression formats: uncompressed, LZ77
  • Portable network graphic images (*.png)
    • byte order: big endian
    • sample sizes: 1, 2, 4, 8, 16 bits per sample
    • color spaces: indexed, grayscale (alpha), RGB(A)
    • compression format: LZ77
    • specials:
      • supported chunks: IHDR, IDAT, IEND, PLTE, gAMA, tRNS, bKGD
      • transparency support partially for RGB, which is stored as 32 bits format

Copyright © 1999, 2002 Mike Lischke
http://www.lischke-online.de


GraphicEx version history

Info here is outdated. Last public version was 9.9.

July through August 2000, version 9.5
  • new/improved color schemes:
    • PhotoYCC
    • YCbCr (not yet correctly working for TIF files, because of subsampling issues)
  • new decoders:
    • CCITT RLEW
    • Thunderscan
    • PCD Huffman
    • TIF JPEG (this is the new format supported by TIF)
  • GraphicFromContent in FileFormatList, CanLoad in all TGraphicExGraphic descentants
  • progress events
  • PhotoCD implementation totally reworked, loads now all formats
  • common image properties
  • bug fixes
May through June 2000, versions 8.0 - 9.0
  • PNG, EPS (preview)
  • TIF JPEG compression introduction
  • zLib conversion
  • file format manager
  • localizable strings
  • color manager
  • common base class TGraphicExGraphic
  • better GIF extension skip mechanism
  • bug fixes
December 1999 through April 2000, versions 1.x - 8.0
  • improved resampling
  • TIFF restructuring creating the base class structure of GraphicEx
  • creation of GraphicCompression with various decoder classes (packed bits, RLE, LZW, CCITT G3 etc.)
  • CMYK and CIE L*a*b* introduction
  • new formats: bw, rgb, rgba, sgi, tga, vst, icb, vda, win, pcx, pcc, scr, pcd, ppm, pgm, pbm, cut (pal), gif, rla, rpf, rle, dib (registration only), pdd, psd, psp
  • bug fixes
01. November 1999
  • implementation so far (created initially for GLScene)


GraphicEx Installation

These files belong to the GraphicEx library:

  • GraphicColor.pas - Contains the implementation of the color manager which is responsible for converting various pixel and color formats.
  • GraphicCompression.pas - Contains various implementations of encoders/decoders which are used to compress and decompress image data.
  • GraphicConfiguration.inc - Contains some compiler switches which control how and what image classes are compiled into the library. This is especially important when you want to enable LZW (after you made your deal with Unisys).
  • GraphicEx.pas - This unit is the main implementation and contains all image classes.
  • GraphicStrings.pas - In order to make GraphicEx localizable I have separated all strings which can be translated when used for other languages. This unit contains the english strings.
  • GraphicStringsDE.pas - This is the german equivalent of GraphicStrings.pas.
  • GraphicStringsRU.pas - And this is the russian version. Note: This unit cannot not be used currently, because the VCL is not able to handle MBCS resource strings. I will probably have to discard resource strings and use resource files later.
  • GraphicStringsFR.pas - This is the french equivalent of GraphicStrings.pas.
  • MZLib.pas - This is a one file, full Delphi translation of the famous zLib which implements a variation of Huffman encoding/decoding known as inflate/deflate or LZ77. With Delphi 5 there comes another implementation but this is based on object files and contains only a Delphi wrapper. This unit can be used standalone but still falls under the licence agreement. In GraphicEx TIF, PNG and PSP use LZ77 as compression scheme.

GraphicEx needs basically no installation because it just registers its graphic classes with TPicture on unit initialization time and from this point on TPicture is able to load images of all supported types. So all you must do to "install" GraphicEx (make its features available at runtime) is to put it in any uses clause of any source file of your project. In order to use GraphicEx images classes at design time too you should add GraphicEx and its associated files into a package of your choice. Any package will do it as long as it is also loaded at design time. Once you have included the library you can load all those exciting image formats at design time too. Note: You will not get an icon or something like this in the component palette. GraphicEx does not implement any component.

Note

With GraphicEx you might face a problem regarding unit/library conflicts. GraphicEx contains now own implementations of the JPEG and zLib libraries. The former is necessary because some internal functions are needed which are not available from the version included in Delphi. The latter lib is included because it is not available in all Delphi versions supported by GraphicEx and if it is there then it is just a wrapper around some object files.

The problems which might arise are that you have two versions of the JPEG lib in your program if you have included JPEG.pas into one of the units in your program. The same is true for the zLib. These problems are temporarily solved by using different names (JPG.pas and MZLib.pas) in GraphicEx. Once I have included an own JPEG graphic class you won't need the Delphi version of JPEG anymore. So at least this problem will elegantly be solved. The zLib conflict, however, cannot be solved this way. I wish Borland had included a real Delphi unit instead of the cheap wrapper. I have no idea how to avoid including zLib twice in a project sometimes, but fortunately this will not happen too often. If you have sources which use the zLib you can simply change the reference to MZLib and adjust a couple of identifiers. For Delphi libraries, however, you would need to recompile them if you want to change the reference, which would be asking too much. So I think in those special cases you have to live with two zLibs. If anyone can come up with an elegant solution then please contact me (Mike Lischke).


Special features
Beginning with version 9.0 some special features have been implemented in GraphicEx which need to be mentioned explicitely to make you aware of their existence.

Image properties

Often it is necessary to read properties of an image without reading the entire image. This includes the image's size, its color scheme, compression scheme and gamma value as well as image resolution (if any). For this purpose a property ImageProperties has been introduced which is basically a record holding all the information read from an image file/stream once it has been loaded or ReadImageProperties has been called.

This collection of properties has not been put into a regular set of class properties with read and write methods because it is rather static and assignments don't make any sense until images are stored to a file or stream (there is still not much save support in GraphicEx, but image properties are an important step to implementent customized image saving). Additionally, there are some more properties which make only sense within the context of a particular load process for a specific graphic class. Especially the TIF JPEG support made it necessary to put quite a lot internal data into the image properties structure. Otherwise extensive value passing would have been the result. Another benefit of this approach is that there is no need to cast a graphic class to a particular GraphicEx class if you just want to read the image properties.

For you as user of GraphicEx these properties will give you important information you can then display in your application very quickly. Once general save support is implemented in GraphicEx they will also be used to determine how to store an image actually.

Content determination

For years it has been quite common to determine a file type from its file extension. This approach, however, is not very reliable and totally useless when loading from media where the file name is not stored (like databases) or where extensions aren't used in that sense like MacOS or Linux. In order to circumvent this limitation another method of TGraphicExGraphic has been introduced: CanLoad. This method is a class method, meaning that you can call it with a class reference like TTIFFGraphic instead of an instance of a particular graphic class. CanLoad operates either on a file or a stream (e.g. blob stream, file stream etc.) and determines whether the particular class is able to load image data contained in the file or stream. GraphicFromContent of TFileFormatList makes use of the CanLoad method to determine a class which can load data which is supposed to comprise an image.

There were doubts that it would be possible to reliably determine an image type from a stream and one can surely cheat some content to pretend an image which isn't really one. But from empirical test with my test image library (containing now ~280 images comprising ~50 MB) I have got the impression that the implementation as it is now is as reliable as one can get it, without making too many reads and checks. The convert demo program which comes with the GraphicEx package makes use of the auto detection feature. Check it out to see that it really works.

Other general features

By the introduction of TGraphicExGraphic some further features have been introduced which are available for all descentants. TGraphicExGraphic holds the generally used color manager reference as well as the image properties record. The image class implements loading an image from resource by name or ID and can polymorphically be used to read image properties and to determine whether a certain image can be loaded by the particular class. For more information see TGraphicExGraphic.

Every graphic class in the library supports now progress events. Generally, there are now 4 different progress states possible.
  1. A GraphicEx graphic can be preparing, which means data must be located and memory allocated. General setup of color manager or other structures might fall into this category.
  2. A GraphicEx graphic can be loading, which means data is currently being loaded from a (probably slow) medium (like a CD).
  3. A GraphicEx graphic can be upsampling, which applies to subsampled image data. One example is a PCD file. Because of its 2x2 subsampled YCbCr color data it is necessary to reverse the subsampling first before the color conversion can start.
  4. Finally a GraphicEx graphic can be transfering, which means image data is actually on the way into the bitmap (which might involve color space conversion).
Obviously not every GraphicEx class enters each of the above states. But the last one is generally used in all classes because image data transfer is the main task of them. Below is an example, taken from the convert demo project, which shows how to use the progress events. It assumes there is a status bar on the form which gets in its third panel a dynamically created progress bar.
procedure TMainForm.ImageLoadProgress(Sender: TObject; Stage: TProgressStage; PercentDone: Byte; RedrawNow: Boolean;
  const R: TRect; const Msg: String);

var
  X: Integer;

begin
  with Statusbar do
  begin
    case Stage of
      psStarting:
        begin
          // remove disturbing elements to improve visibility
          // of the progress bar
          Panels[2].Bevel := pbNone;
          SizeGrip := False;
          // create the progress bar and make the status bar its parent
          FProgressBar := TProgressBar.Create(nil);
          FProgressBar.Parent := StatusBar;
          // progress events always go from 0 to 100%
          FProgressBar.Max := 100;
          Statusbar.Panels[1].Text := Msg;
          // fit the progress bar exactly into its target panel
          X := 4 + Panels[0].Width + Panels[1].Width;
          FProgressBar.SetBounds(X, 4, Panels[2].Width, Height - 6);
          FProgressBar.Show;
          Application.ProcessMessages;
        end;
      psEnding:
        begin
          FProgressBar.Free;
          FProgressBar := nil;
          // restore status bar elements we have removed
          Panels[2].Bevel := pbLowered;
          SizeGrip := True;
        end;
      psRunning:
        begin
          FProgressBar.Position := PercentDone;
          FProgressBar.Update;
          Application.ProcessMessages;
        end;
    end;
  end;
end;


GraphicEx - Overview

GraphicEx
Units Classes Types Routines Vars Consts

Units
GraphicColor
GraphicCompression
GraphicEx
GraphicStrings

Classes
TAutodeskGraphic
TCCITTDecoder
TCCITTFax3Decoder
TCCITTMHDecoder
TColorManager
TCUTGraphic
TCUTRLEDecoder
TDecoder
TEPSGraphic
TFileFormatList
TGIFGraphic
TGIFLZWDecoder
TGraphicExGraphic
TLZ77Decoder
TPackbitsRLEDecoder
TPCDDecoder
TPCDGraphic
TPCXGraphic
TPCXRLEDecoder
TPNGGraphic
TPPMGraphic
TPSDGraphic
TPSPGraphic
TPSPRLEDecoder
TRLADecoder
TRLAGraphic
TSGIGraphic
TSGIRLEDecoder
TTargaGraphic
TTargaRLEDecoder
TThunderDecoder
TTIFFGraphic
TTIFFJPEGDecoder
TTIFFLZWDecoder

Types
PImageProperties
PJPEGState
TByteArray
TCardinalArray
TChunkType
TColorScheme
TCompressionType
TConversionMethod
TConvertOptions
TFilterOption
TFilterOptions
TFilterSortType
TFloatArray
TFormatType
TFormatTypes
TGraphicExGraphicClass
TIFDEntry
TImageOptions
TImageProperties
TJPEGGeneral
TJPEGState
TPNGChunkHeader
TRawPaletteFormat
TResamplingFilter
TStateArray
TStateEntry
TTIFFPalette

Routines
ClampByte
MulDiv16
Stretch

Global Variables
FileFormatList

Global Constants
DefaultDisplayGamma


Credits
I like to thank some people for their work and help. Without this support GraphicEx would not be what it is.
  • Steffen Binas (home.t-online.de/home/steffen.binas/ehomepge.htm) for sending me basic TIF writer code. However, I still have not included it into GraphicEx.
  • Robert Galle (www.whereisit-soft.com) for making me aware of potential GIF extension problems
  • Dipl. Ing. Ingo Neumann (ingo@upstart.de), who provided me a basic RLA loader class
Additionally, I have used some publicly available code and information to improve GraphicEx.
  • Anders Melander (www.melander.dk) implemented a stretch routine on which the GraphicEx stretch code is based.
  • John Cristy (www.wizards.dupont.com/cristy/ImageMagick.html) wrote the library ImageMagic which contains code to decode PhotoCD images on which TPCDDecoder is based.


License agreement

GraphicEx licensing

GraphicEx is published under the Mozilla Public License (MPL). For more info about MPL read the MPL homepage. .


TAutodeskGraphic

TAutodeskGraphic Object
Methods

Autodesk cel and pic images.

Unit
GraphicEx

Declaration
TAutodeskGraphic = class(TGraphicExGraphic)

Hierarchy
TBitmap <--TGraphicExGraphic <--TAutodeskGraphic

Subclasses
None

Introduced Methods
CanLoad
LoadFromStream
ReadImageProperties

See Also

  • TCUTGraphic TGIFGraphic TGraphicExGraphic TPCDGraphic TPCXGraphic TPNGGraphic TPPMGraphic TPSDGraphic TPSPGraphic TRLAGraphic TSGIGraphic TTIFFGraphic TTargaGraphic


TCCITTDecoder

TCCITTDecoder Object
Methods

common base class for CCITT encoders/decoders

Unit
GraphicCompression

Declaration
TCCITTDecoder = class(TDecoder)

Hierarchy
TObject <--TDecoder <--TCCITTDecoder

Direct subclasses
TCCITTFax3Decoder TCCITTMHDecoder

Description
This class implements the state machine used in all descentants.

Introduced Methods
Create | constructor of the class taking some parameters used for decompression.
FillRun | Fills a run of pixels (bits).
FindBlackCode | finds next code for a black run
FindWhiteCode | finds next code for a white run
MakeStates | creates the internal tables of white and black codes and run lengths
NextBit | special function only used in begin-of-line synchronization


TCCITTFax3Decoder

TCCITTFax3Decoder Object
Methods

specialized CCITT decoder

Unit
GraphicCompression

Declaration
TCCITTFax3Decoder = class(TCCITTDecoder)

Hierarchy
TObject <--TDecoder <--TCCITTDecoder <--TCCITTFax3Decoder

Subclasses
None

Description
Descentant of TCCITTDecoder which manages some specifics for raw fax 3 encoding/decoding.

Introduced Methods
Decode | see the common description in TDecoder
Encode | see the common description in TDecoder


TCCITTMHDecoder

TCCITTMHDecoder Object
Methods

specialized CCITT decoder

Unit
GraphicCompression

Declaration
TCCITTMHDecoder = class(TCCITTDecoder)

Hierarchy
TObject <--TDecoder <--TCCITTDecoder <--TCCITTMHDecoder

Subclasses
None

Description
Descentant of TCCITTDecoder which manages some specifics for modified fax 3 encoding/decoding (also known as modified Hufmann).

Introduced Methods
Decode | see the common description in TDecoder
Encode | see the common description in TDecoder


TColorManager

TColorManager Object
Properties Methods

Converts image data between various color and pixel formats.

Unit
GraphicColor

Declaration
TColorManager = class(TObject)

Hierarchy
TObject <--TColorManager

Subclasses
None

Description

For a general description of why color conversion is necessary and what conversion are supported see GraphicColor

TColorManager has been designed to work with most of the commonly used color and image formats and still can be used in an easy manner. The general use is as follows:

  1. Set samples per pixel for source and target format.
  2. Set bits per sample for source and target format.
  3. Set color formats for source and target. Properties set in points 1..3 are used in every other method of the manager and thus very important for correct results.
  4. Set gamma values if necessary. Note: usually you would set a gamma value provided by the image file (for this the value is called "file gamma"). For better gamma correction, though, a second value is used, the so called "display gamma" which describes gamma correction for your monitor. Display gamma is by default set to 2.2 (as of an average monitor). If you would like to let your user choose what gamma he wants or to adjust to other display devices you can set another display gamma value together with the file gamma.
  5. Set source and target options which determine the way colors are converted and palettes are created.
  6. Set special color conversion parameters if needed, like YCbCr parameters.
  7. After you have set these values TColorManager is ready to produce a palette for you. Call either CreateGrayScalePalette or CreateColorPalette both of which return a palette handle which can directly be assigned to TBitmap.Palette. If you have enabled target gamma correction then palettes returned by these methods are filled with gamma corrected values.
  8. The color manager is also able to determine the proper pixel format according to the set pixel sizes. Usually you only need TargetPixelFormat.
After this setup has been done you can use ConvertRow for every image line to convert.

Introduced Public Properties
SourceBitsPerSample | read or set number of bits of one source sample
SourceColorScheme | read or set source color schemes
SourceOptions | determines processing options for source color data
SourcePixelFormat | used to retrieve a pixelformat value
SourceSamplesPerPixel | read or set number of samples of one source pixel
TargetBitsPerSample | read or set the number of bits of one target sample
TargetColorScheme | read or set target color schemes
TargetOptions | determines processing options for target color data
TargetPixelFormat | used to retrieve a pixelformat value
TargetSamplesPerPixel | read or set number of samples of one target pixel

Introduced Methods
ComponentGammaConvert | low level sample conversion routine
ComponentNoConvert16 | low level sample conversion routine
ComponentNoConvert8 | low level sample conversion routine
ComponentScaleConvert | low level sample conversion routine
ComponentScaleGammaConvert | low level sample conversion routine
ComponentSwapConvert | low level sample conversion routine
ComponentSwapScaleConvert | low level sample conversion routine
ComponentSwapScaleGammaConvert | low level sample conversion routine
ConvertRow | Calls the proper conversion method according to input and output color formats.
Create | color manager constructor to initializes some default values
CreateColorPalette | creates a color palette
CreateGrayscalePalette | creates a grayscale palette
CreateYCbCrLookup | internally used
Error | displays an error message
GetPixelFormat | read method for SourcePixelFormat and TargetPixelFormat
PrepareConversion | pepares the conversion depending on set color scheme and format values
RowConvertBGR2BGR | core conversion routine for a row, internal use only
RowConvertBGR2RGB | core conversion routine for a row, internal use only
RowConvertCIELAB2BGR | core conversion routine for a row, internal use only
RowConvertCIELAB2RGB | core conversion routine for a row, internal use only
RowConvertCMYK2BGR | core conversion routine for a row, internal use only
RowConvertCMYK2RGB | core conversion routine for a row, internal use only
RowConvertGray | core conversion routine for a row, internal use only
RowConvertIndexed8 | core conversion routine for a row, internal use only
RowConvertIndexedBoth16 | core conversion routine for a row, internal use only
RowConvertIndexedSource16 | core conversion routine for a row, internal use only
RowConvertIndexedTarget16 | core conversion routine for a row, internal use only
RowConvertPhotoYCC2BGR | core conversion routine for a row, internal use only
RowConvertPhotoYCC2RGB | core conversion routine for a row, internal use only
RowConvertRGB2BGR | core conversion routine for a row, internal use only
RowConvertRGB2RGB | core conversion routine for a row, internal use only
RowConvertYCbCr2BGR | core conversion routine for a row, internal use only
RowConvertYCbCr2RGB | core conversion routine for a row, internal use only
SetGamma | Used to set the gamma value(s) which should be used to create the gamma lookup table.
SetSourceBitsPerSample | write method for SourceBitsPerSample
SetSourceColorScheme | write method for SourceColorScheme
SetSourceSamplesPerPixel | write method for SourceSamplesPerPixel
SetTargetBitsPerSample | write method for TargetBitsPerSample
SetTargetColorScheme | write method for TargetColorScheme
SetTargetSamplesPerPixel | write method for TargetSamplesPerPixel
SetYCbCrParameters | sets parameters needed to convert to and from YCbCr color scheme


TCUTGraphic

TCUTGraphic Object
Properties Methods

Dr. Halo cut images

Unit
GraphicEx

Declaration
TCUTGraphic = class(TGraphicExGraphic)

Hierarchy
TBitmap <--TGraphicExGraphic <--TCUTGraphic

Subclasses
None

Introduced Public Properties
PaletteFile

Introduced Methods
CanLoad
LoadFromFile
LoadFromStream
LoadPalette
ReadImageProperties

See Also

  • TAutodeskGraphic TGIFGraphic TGraphicExGraphic TPCDGraphic TPCXGraphic TPNGGraphic TPPMGraphic TPSDGraphic TPSPGraphic TRLAGraphic TSGIGraphic TTIFFGraphic TTargaGraphic


TCUTRLEDecoder

TCUTRLEDecoder Object
Methods

RLE encoder/decoder for Dr. Halo CUT images

Unit
GraphicCompression

Declaration
TCUTRLEDecoder = class(TDecoder)

Hierarchy
TObject <--TDecoder <--TCUTRLEDecoder

Subclasses
None

Introduced Methods
Decode | see the common description in TDecoder
Encode | see the common description in TDecoder


TDecoder

TDecoder Object
Methods

common base class for all encoder/decoder implementations

Unit
GraphicCompression

Declaration
TDecoder = class(TObject)

Hierarchy
TObject <--TDecoder

Direct subclasses
TCCITTDecoder TCUTRLEDecoder TGIFLZWDecoder TLZ77Decoder TPackbitsRLEDecoder TPCDDecoder TPCXRLEDecoder TPSPRLEDecoder TRLADecoder TSGIRLEDecoder TTargaRLEDecoder TThunderDecoder TTIFFJPEGDecoder TTIFFLZWDecoder

Description
TDecoder is an abstract base base which defines methods which all decoders have in common. "Abstract base class" means that TDecoder does not implement any feature, so don't create and use an instance of TDecoder but rather use its descentants or create a new, derived class.

TDecoder and its descentants use a certain order which you must follow when using them yourself. Basically, there are two main pathes. One is encoding which means to compress data from an input buffer into an output buffer and decoding which is the reverse process.

Each path consists of three steps: preparation, action, finalization. Each step is represented by a method, e.g. for decoding these are DecodeInit, Decode and DecodeEnd (usually called in this order, similar for encoding). DecodeInit is called just after creation of a decoder and can also be used to reset the decoder class to a certain start state. Decode is called once for every buffer which must be decoded. Note: This is not generally pixel line oriented, but buffer sizes are often multiples of such a line. Finally, DecodeEnd is called just before the class is destroyed but could also be used to finish stuff like memory or other libraries (like JPEG and zLib) before the decoder is reset via DecodeInit.

Introduced Methods
Decode | decompresses data
DecodeEnd | finalization method called to allow the class to clean its structures
DecodeInit | initialization method called to allow the class to allocate memory, prepare structures etc.
Encode | compresses data
EncodeEnd | finalization method called to allow the class to clean its structures
EncodeInit | initialization method called to allow the class to allocate memory, prepare structures etc.


TEPSGraphic

TEPSGraphic Object
Methods

Enhanced Postscript eps preview images

Unit
GraphicEx

Declaration
TEPSGraphic = class(TTIFFGraphic)

Hierarchy
TBitmap <--TGraphicExGraphic <--TTIFFGraphic <--TEPSGraphic

Subclasses
None

Introduced Methods
CanLoad
LoadFromStream
ReadImageProperties


TFileFormatList

TFileFormatList Object
Methods

Graphic class manager

Unit
GraphicEx

Declaration
TFileFormatList = class(TObject)

Hierarchy
TObject <--TFileFormatList

Subclasses
None

Description
This class is responsible for registering GraphicEx classes with TPicture as well as keeping a features list to allow selective filter strings to be build.

Introduced Methods
Clear | Clears the internal lists of registered image classes.
Create | Creates an instance of TFileformatList.
Destroy | Destroys this file format list instance.
FindExtension | Returns the index of the extension entry which belongs to the given extension string.
FindGraphicClass | Returns the class entry index which belongs to the given graphic class.
GetDescription |
GetExtensionList | Returns a list of strings for all extensions which are currently registered.
GetGraphicFilter | Creates a string which can directly be used in open or save dialogs.
GraphicFromContent |
GraphicFromExtension |
RegisterFileFormat | Registers the given graphic class with the passed extension string.
UnregisterFileFormat | Removes the entry for the given extension from the internal list.


TGIFGraphic

TGIFGraphic Object
Methods

Compuserve gif images

Unit
GraphicEx

Declaration
TGIFGraphic = class(TGraphicExGraphic)

Hierarchy
TBitmap <--TGraphicExGraphic <--TGIFGraphic

Subclasses
None

Description
Note: This format uses the LZW compression scheme for which Unisys owns a patent. The class is disabled by default (see also GraphicConfiguration.inc) and you should officially buy a license if you plan to use the loader class.

Introduced Methods
CanLoad
LoadFromStream
ReadImageProperties
SkipExtensions

See Also

  • TAutodeskGraphic TCUTGraphic TGraphicExGraphic TPCDGraphic TPCXGraphic TPNGGraphic TPPMGraphic TPSDGraphic TPSPGraphic TRLAGraphic TSGIGraphic TTIFFGraphic TTargaGraphic


TGIFLZWDecoder

TGIFLZWDecoder Object
Methods

LZW encoder/decoder for GIF images

Unit
GraphicCompression

Declaration
TGIFLZWDecoder = class(TDecoder)

Hierarchy
TObject <--TDecoder <--TGIFLZWDecoder

Subclasses
None

Description

Note
This decoder class is by default disabled because it uses a patented algorithm known as LZW (Lempel-Zif-Welch) owned by Unisys (see also License Information on GIF and Other LZW-based Technologies).

Introduced Methods
Create |
Decode | see the common description in TDecoder
Encode | see the common description in TDecoder


TGraphicExGraphic

TGraphicExGraphic Object
Properties Methods

Generic base class for all GraphicEx image classes

Unit
GraphicEx

Declaration
TGraphicExGraphic = class(TBitmap)

Hierarchy
TBitmap <--TGraphicExGraphic

Direct subclasses
TAutodeskGraphic TCUTGraphic TGIFGraphic TPCDGraphic TPCXGraphic TPNGGraphic TPPMGraphic TPSDGraphic TPSPGraphic TRLAGraphic TSGIGraphic TTargaGraphic TTIFFGraphic

Description
This class maintains the color conversion manager reference which is used in almost all descentants. Additionally, it provides method to load images from the application's resource.

Introduced Public Properties
ColorManager
ImageProperties

Introduced Methods
Assign |
CanLoad |
Create | Creates an instance of TGraphicExGraphic.
Destroy | Destroys the instance.
LoadFromResourceID | Loads an image from the resource with the given ID.
LoadFromResourceName | Loads an image from the resource with the given name.
ReadImageProperties |

See Also

  • TAutodeskGraphic TCUTGraphic TGIFGraphic TPCDGraphic TPCXGraphic TPNGGraphic TPPMGraphic TPSDGraphic TPSPGraphic TRLAGraphic TSGIGraphic TTIFFGraphic TTargaGraphic


TLZ77Decoder

TLZ77Decoder Object
Properties Methods

LZ77 encoder/decoder for TIF, PSP and PNG images

Unit
GraphicCompression

Declaration
TLZ77Decoder = class(TDecoder)

Hierarchy
TObject <--TDecoder <--TLZ77Decoder

Subclasses
None

Description
In opposition to LZW (see also TGIFLZWDecoder) is LZ77 not a patented algorithm and can thus be used without paying license fees to a company.

Introduced Public Properties
AvailableInput | number of not yet used input bytes
AvailableOutput | number of not yet used output bytes
ZLibResult | result of the last zLib operation

Introduced Methods
Create |
Decode | see the common description in TDecoder
DecodeEnd | see the common description in TDecoder
DecodeInit | see the common description in TDecoder
Encode | see the common description in TDecoder
GetAvailableInput | read method for property AvailableInput
GetAvailableOutput | read method for property AvailableOutput


TPackbitsRLEDecoder

TPackbitsRLEDecoder Object
Methods

Macintosh packed bits RLE encoder/decoder

Unit
GraphicCompression

Declaration
TPackbitsRLEDecoder = class(TDecoder)

Hierarchy
TObject <--TDecoder <--TPackbitsRLEDecoder

Subclasses
None

Introduced Methods
Decode | see the common description in TDecoder
Encode | see the common description in TDecoder


TPCDDecoder

TPCDDecoder Object
Methods

modified Huffman encoder/decoder for PhotoCD images

Unit
GraphicCompression

Declaration
TPCDDecoder = class(TDecoder)

Hierarchy
TObject <--TDecoder <--TPCDDecoder

Subclasses
None

Introduced Methods
Create |
Decode | see the common description in TDecoder
Encode | see the common description in TDecoder


TPCDGraphic

TPCDGraphic Object
Methods

Kodak Photo-CD pcd images

Unit
GraphicEx

Declaration
TPCDGraphic = class(TGraphicExGraphic)

Hierarchy
TBitmap <--TGraphicExGraphic <--TPCDGraphic

Subclasses
None

Introduced Methods
CanLoad
LoadFromStream
ReadImageProperties

See Also

  • TAutodeskGraphic TCUTGraphic TGIFGraphic TGraphicExGraphic TPCXGraphic TPNGGraphic TPPMGraphic TPSDGraphic TPSPGraphic TRLAGraphic TSGIGraphic TTIFFGraphic TTargaGraphic


TPCXGraphic

TPCXGraphic Object
Methods

ZSoft Paintbrush pcx and pcc images

Unit
GraphicEx

Declaration
TPCXGraphic = class(TGraphicExGraphic)

Hierarchy
TBitmap <--TGraphicExGraphic <--TPCXGraphic

Subclasses
None

Description
This class does also support Word 5.x screen capture images which are essentially PCX files, but with another magic ID.

Introduced Methods
CanLoad
LoadFromStream
ReadImageProperties

See Also

  • TAutodeskGraphic TCUTGraphic TGIFGraphic TGraphicExGraphic TPCDGraphic TPNGGraphic TPPMGraphic TPSDGraphic TPSPGraphic TRLAGraphic TSGIGraphic TTIFFGraphic TTargaGraphic


TPCXRLEDecoder

TPCXRLEDecoder Object
Methods

RLE encoder/decoder for PCX images

Unit
GraphicCompression

Declaration
TPCXRLEDecoder = class(TDecoder)

Hierarchy
TObject <--TDecoder <--TPCXRLEDecoder

Subclasses
None

Introduced Methods
Decode | see the common description in TDecoder
Encode | see the common description in TDecoder


TPNGGraphic

TPNGGraphic Object
Properties Methods

Portable Network Graphic png images

Unit
GraphicEx

Declaration
TPNGGraphic = class(TGraphicExGraphic)

Hierarchy
TBitmap <--TGraphicExGraphic <--TPNGGraphic

Subclasses
None

Introduced Public Properties
BackgroundColor
Transparency

Introduced Methods
ApplyFilter
CanLoad
IsChunk
LoadAndSwapHeader
LoadBackgroundColor
LoadFromStream
LoadIDAT
LoadTransparency
ReadDataAndCheckCRC
ReadImageProperties
ReadRow
SetupColorDepth

See Also

  • TAutodeskGraphic TCUTGraphic TGIFGraphic TGraphicExGraphic TPCDGraphic TPCXGraphic TPPMGraphic TPSDGraphic TPSPGraphic TRLAGraphic TSGIGraphic TTIFFGraphic TTargaGraphic


TPPMGraphic

TPPMGraphic Object
Methods

Portable Pixel Map ppm, Gray Map pgm and Bit Map pbm images

Unit
GraphicEx

Declaration
TPPMGraphic = class(TGraphicExGraphic)

Hierarchy
TBitmap <--TGraphicExGraphic <--TPPMGraphic

Subclasses
None

Introduced Methods
CanLoad
CurrentChar
GetChar
GetNumber
LoadFromStream
ReadImageProperties
ReadLine

See Also

  • TAutodeskGraphic TCUTGraphic TGIFGraphic TGraphicExGraphic TPCDGraphic TPCXGraphic TPNGGraphic TPSDGraphic TPSPGraphic TRLAGraphic TSGIGraphic TTIFFGraphic TTargaGraphic


TPSDGraphic

TPSDGraphic Object
Methods

Photoshop psd and pdd images

Unit
GraphicEx

Declaration
TPSDGraphic = class(TGraphicExGraphic)

Hierarchy
TBitmap <--TGraphicExGraphic <--TPSDGraphic

Subclasses
None

Introduced Methods
CanLoad
LoadFromStream
ReadImageProperties

See Also

  • TAutodeskGraphic TCUTGraphic TGIFGraphic TGraphicExGraphic TPCDGraphic TPCXGraphic TPNGGraphic TPPMGraphic TPSPGraphic TRLAGraphic TSGIGraphic TTIFFGraphic TTargaGraphic


TPSPGraphic

TPSPGraphic Object
Methods

Paintshop Pro psp images

Unit
GraphicEx

Declaration
TPSPGraphic = class(TGraphicExGraphic)

Hierarchy
TBitmap <--TGraphicExGraphic <--TPSPGraphic

Subclasses
None

Introduced Methods
CanLoad
LoadFromStream
ReadImageProperties

See Also

  • TAutodeskGraphic TCUTGraphic TGIFGraphic TGraphicExGraphic TPCDGraphic TPCXGraphic TPNGGraphic TPPMGraphic TPSDGraphic TRLAGraphic TSGIGraphic TTIFFGraphic TTargaGraphic


TPSPRLEDecoder

TPSPRLEDecoder Object
Methods

RLE encoder/decoder for PSP images

Unit
GraphicCompression

Declaration
TPSPRLEDecoder = class(TDecoder)

Hierarchy
TObject <--TDecoder <--TPSPRLEDecoder

Subclasses
None

Introduced Methods
Decode | see the common description in TDecoder
Encode | see the common description in TDecoder


TRLADecoder

TRLADecoder Object
Methods

RLE encoder/decoder for RLA images

Unit
GraphicCompression

Declaration
TRLADecoder = class(TDecoder)

Hierarchy
TObject <--TDecoder <--TRLADecoder

Subclasses
None

Introduced Methods
Decode | see the common description in TDecoder
Encode | see the common description in TDecoder


TRLAGraphic

TRLAGraphic Object
Methods

Alias/Wavefront rla and rpf images

Unit
GraphicEx

Declaration
TRLAGraphic = class(TGraphicExGraphic)

Hierarchy
TBitmap <--TGraphicExGraphic <--TRLAGraphic

Subclasses
None

Introduced Methods
CanLoad
LoadFromStream
ReadImageProperties
SwapHeader

See Also

  • TAutodeskGraphic TCUTGraphic TGIFGraphic TGraphicExGraphic TPCDGraphic TPCXGraphic TPNGGraphic TPPMGraphic TPSDGraphic TPSPGraphic TSGIGraphic TTIFFGraphic TTargaGraphic


TSGIGraphic

TSGIGraphic Object
Methods

SGI black & white bw, true color rgb(a) and sgi images

Unit
GraphicEx

Declaration
TSGIGraphic = class(TGraphicExGraphic)

Hierarchy
TBitmap <--TGraphicExGraphic <--TSGIGraphic

Subclasses
None

Introduced Methods
CanLoad
LoadFromStream
ReadAndDecode
ReadImageProperties

See Also

  • TAutodeskGraphic TCUTGraphic TGIFGraphic TGraphicExGraphic TPCDGraphic TPCXGraphic TPNGGraphic TPPMGraphic TPSDGraphic TPSPGraphic TRLAGraphic TTIFFGraphic TTargaGraphic


TSGIRLEDecoder

TSGIRLEDecoder Object
Methods

RLE encoder/decoder for SGI images

Unit
GraphicCompression

Declaration
TSGIRLEDecoder = class(TDecoder)

Hierarchy
TObject <--TDecoder <--TSGIRLEDecoder

Subclasses
None

Introduced Methods
Create |
Decode | see the common description in TDecoder
Encode | see the common description in TDecoder


TTargaGraphic

TTargaGraphic Object
Methods

Truevision tga, vst, isb, vda and win images

Unit
GraphicEx

Declaration
TTargaGraphic = class(TGraphicExGraphic)

Hierarchy
TBitmap <--TGraphicExGraphic <--TTargaGraphic

Subclasses
None

Introduced Methods
CanLoad
LoadFromStream
ReadImageProperties
SaveToStream

See Also

  • TAutodeskGraphic TCUTGraphic TGIFGraphic TGraphicExGraphic TPCDGraphic TPCXGraphic TPNGGraphic TPPMGraphic TPSDGraphic TPSPGraphic TRLAGraphic TSGIGraphic TTIFFGraphic


TTargaRLEDecoder

TTargaRLEDecoder Object
Methods

RLE encoder/decoder for Truevision images

Unit
GraphicCompression

Declaration
TTargaRLEDecoder = class(TDecoder)

Hierarchy
TObject <--TDecoder <--TTargaRLEDecoder

Subclasses
None

Introduced Methods
Create |
Decode | < see the common description in TDecoder
Encode | see the common description in TDecoder


TThunderDecoder

TThunderDecoder Object
Methods
Thunderscan encoder/decoder class for TIF images

Unit
GraphicCompression

Declaration
TThunderDecoder = class(TDecoder)

Hierarchy
TObject <--TDecoder <--TThunderDecoder

Subclasses
None

Introduced Methods
Create |
Decode | see the common description in TDecoder
Encode | see the common description in TDecoder


TTIFFGraphic

TTIFFGraphic Object
Methods

Tagged Image Format tif and tiff images

Unit
GraphicEx

Declaration
TTIFFGraphic = class(TGraphicExGraphic)

Hierarchy
TBitmap <--TGraphicExGraphic <--TTIFFGraphic

Direct subclasses
TEPSGraphic

Introduced Methods
CanLoad
FindTag
GetValue
GetValueList
LoadFromStream
ReadImageProperties
SaveToStream
SortIFD
SwapIFD

See Also

  • TAutodeskGraphic TCUTGraphic TGIFGraphic TGraphicExGraphic TPCDGraphic TPCXGraphic TPNGGraphic TPPMGraphic TPSDGraphic TPSPGraphic TRLAGraphic TSGIGraphic TTargaGraphic


TTIFFJPEGDecoder

TTIFFJPEGDecoder Object
Methods

JPEG encoder/decoder for TIF images

Unit
GraphicCompression

Declaration
TTIFFJPEGDecoder = class(TDecoder)

Hierarchy
TObject <--TDecoder <--TTIFFJPEGDecoder

Subclasses
None

Introduced Methods
Create |
Decode | see the common description in TDecoder
DecodeEnd | see the common description in TDecoder
DecodeInit | see the common description in TDecoder
Encode | see the common description in TDecoder


TTIFFLZWDecoder

TTIFFLZWDecoder Object
Methods

LZW encoder/decoder for TIF images

Unit
GraphicCompression

Declaration
TTIFFLZWDecoder = class(TDecoder)

Hierarchy
TObject <--TDecoder <--TTIFFLZWDecoder

Subclasses
None

Description

Note
This decoder class is by default disabled because it uses a patented algorithm known as LZW (Lempel-Zif-Welch) owned by Unisys (see also License Information on GIF and Other LZW-based Technologies).

Introduced Methods
Decode | see the common description in TDecoder
Encode | see the common description in TDecoder


DefaultDisplayGamma Constant

DefaultDisplayGamma Global Constant

default value for display gamma

Unit
GraphicColor

Declaration
DefaultDisplayGamma = 2.2;

Description
The value corresponds to an average computer monitor and is only be used if no own display gamma value is passed to TColorManager.SetGamma.


ClampByte

ClampByte Function

general support routine

Unit
GraphicColor

Declaration
Function ClampByte(Value: Integer): Byte;

Description
This function ensures that the input value is in the range 0..255.


MulDiv16

MulDiv16 Function

general support routine

Unit
GraphicColor

Declaration
Function MulDiv16(Number, Numerator, Denominator: Word): Word;

Description
This function is an optimized variant of Windows' MulDiv function, is bare any error checking and works only for 16 bit unsigned values (Word). This way it is really fast.


Stretch

Stretch Routines

Unit
GraphicEx

Overloaded Variants
Procedure Stretch(NewWidth, NewHeight: Cardinal; Filter: TResamplingFilter; Radius: Single; Source, Target: TBitmap);
Procedure Stretch(NewWidth, NewHeight: Cardinal; Filter: TResamplingFilter; Radius: Single; Source: TBitmap);

Declaration
Procedure Stretch(NewWidth, NewHeight: Cardinal; Filter: TResamplingFilter; Radius: Single; Source, Target: TBitmap);

Declaration
Procedure Stretch(NewWidth, NewHeight: Cardinal; Filter: TResamplingFilter; Radius: Single; Source: TBitmap);


TAutodeskGraphic.CanLoad Method

CanLoad method

Applies to
TAutodeskGraphic

Declaration
class function CanLoad(Stream: TStream): Boolean;


TAutodeskGraphic.LoadFromStream Method

LoadFromStream method

Applies to
TAutodeskGraphic

Declaration
procedure LoadFromStream(Stream: TStream);


TAutodeskGraphic.ReadImageProperties Method

ReadImageProperties method

Applies to
TAutodeskGraphic

Declaration
function ReadImageProperties(Stream: TStream; ImageIndex: Cardinal): Boolean;


TCCITTDecoder.Create Method

Create method
constructor of the class taking some parameters used for decompression.

Applies to
TCCITTDecoder

Declaration
constructor Create(Options: Integer; SwapBits, WordAligned: Boolean; Width: Cardinal);

Description
This method also creates the internal arrays which form the data part of the CCITT state machine.


TCCITTDecoder.FillRun Method

FillRun method

Fills a run of pixels (bits).

Applies to
TCCITTDecoder

Declaration
function FillRun(RunLength: Cardinal): Boolean;

Description
RunLength determines how many pixels must be filled. One exit the target pointer is adjusted accordingly. Actual target bits are only set if they differ from the default value (which is white).


TCCITTDecoder.FindBlackCode Method

FindBlackCode method

finds next code for a black run

Applies to
TCCITTDecoder

Declaration
function FindBlackCode: Integer;

Description
The method executes the internal state machine using the black codes to determine the length of the next black pixel run and returns it.


TCCITTDecoder.FindWhiteCode Method

FindWhiteCode method

finds next code for a white run

Applies to
TCCITTDecoder

Declaration
function FindWhiteCode: Integer;

Description
The method executes the internal state machine using the white codes to determine the length of the next white pixel run and returns.


TCCITTDecoder.MakeStates Method

MakeStates method

creates the internal tables of white and black codes and run lengths

Applies to
TCCITTDecoder

Declaration
procedure MakeStates;

Description
For fast decompression of fax data a state machine implementation is used which is prepared in this method.


TCCITTDecoder.NextBit Method

NextBit method

special function only used in begin-of-line synchronization

Applies to
TCCITTDecoder

Declaration
function NextBit: Boolean;

Description
This method skips bit by bit to find a particular start combination. This is necessary to skip fill bits or trash bits in lines which are not correctly compressed.


TCCITTFax3Decoder.Decode Method

Decode method

see the common description in TDecoder

Applies to
TCCITTFax3Decoder

Declaration
procedure Decode(var Source, Dest: Pointer; PackedSize, UnpackedSize: Integer);


TCCITTFax3Decoder.Encode Method

Encode method

see the common description in TDecoder

Applies to
TCCITTFax3Decoder

Declaration
procedure Encode(Source, Dest: Pointer; Count: Cardinal; var BytesStored: Cardinal);


TCCITTMHDecoder.Decode Method

Decode method

see the common description in TDecoder

Applies to
TCCITTMHDecoder

Declaration
procedure Decode(var Source, Dest: Pointer; PackedSize, UnpackedSize: Integer);


TCCITTMHDecoder.Encode Method

Encode method

see the common description in TDecoder

Applies to
TCCITTMHDecoder

Declaration
procedure Encode(Source, Dest: Pointer; Count: Cardinal; var BytesStored: Cardinal);


TColorManager.ComponentGammaConvert Method

ComponentGammaConvert method

low level sample conversion routine

Applies to
TColorManager

Declaration
function ComponentGammaConvert(Value: Byte): Byte;

Description
Converts samples using the internal gamma conversion table.


TColorManager.ComponentNoConvert8 Method

ComponentNoConvert8 method

low level sample conversion routine

Applies to
TColorManager

Declaration
function ComponentNoConvert8(Value: Byte): Byte;

Description
Stub method used when no conversion for 8 bits samples is necessary. It just copies the value.


TColorManager.ComponentNoConvert16 Method

ComponentNoConvert16 method

low level sample conversion routine

Applies to
TColorManager

Declaration
function ComponentNoConvert16(Value: Word): Word;

Description
Stub method used when no conversion for 16 bits samples is necessary. It just copies the value.


TColorManager.ComponentScaleConvert Method

ComponentScaleConvert method

low level sample conversion routine

Applies to
TColorManager

Declaration
function ComponentScaleConvert(Value: Word): Byte;

Description
Converts 16 bits values to 8 bits values using linear scaling.


TColorManager.ComponentScaleGammaConvert Method

ComponentScaleGammaConvert method

low level sample conversion routine

Applies to
TColorManager

Declaration
function ComponentScaleGammaConvert(Value: Word): Byte;

Description
Converts 16 bits values to 8 bits values using linear scaling and performs then a gamma lookup.


TColorManager.ComponentSwapConvert Method

ComponentSwapConvert method

low level sample conversion routine

Applies to
TColorManager

Declaration
function ComponentSwapConvert(Value: Word): Word;

Description
Swaps byte order of the value.


TColorManager.ComponentSwapScaleConvert Method

ComponentSwapScaleConvert method

low level sample conversion routine

Applies to
TColorManager

Declaration
function ComponentSwapScaleConvert(Value: Word): Byte;

Description
Swaps byte order of the input value and performs then a linear scale down to 8 bits.


TColorManager.ComponentSwapScaleGammaConvert Method

ComponentSwapScaleGammaConvert method

low level sample conversion routine

Applies to
TColorManager

Declaration
function ComponentSwapScaleGammaConvert(Value: Word): Byte;

Description
Swaps byte order of the input value, performs then a linear scale down to 8 bits and finally does a gamma lookup.


TColorManager.ConvertRow Method

ConvertRow method

Calls the proper conversion method according to input and output color formats.

Applies to
TColorManager

Declaration
procedure ConvertRow(Source: array of Pointer; Target: Pointer; Count: Cardinal; Mask: Byte);

Description

If necessary some internal initialization is done (depends of whether a property change happend or not).

Source is an open array parameter to allow either interlaced or plane source data pointer to be passed. It is assumed that source data is provided in interlaced form when Source only contains one entry. If there are more than one entry passed then Source must contain at least as many entries as samples needed by the specified source color scheme. That is for RGB there must be 3 pointer, for RGBA and CMYK four etc. Keep in mind this only applies if your data is in plane format!
Target points to the place where the converted image data should be placed. This parameter is usually a scanline of a bitmap. Count is the number of pixels to process and Mask contains a value which determines which source pixel are to be transfered. A 1 bit allows the transfer, while a 0 prohibits it. Bits are read from MSB to LSB while the pixels are processed from left to right. Note that the source data must be "packed" if Mask is not $FF. This means no source data is skipped if a 0 appears in the mask. There must be no data passed for pixels which are never transfered. Mask is applied in repeative manner, i.e. every 8 pixels the same pattern is applied.


TColorManager.Create Method

Create method
color manager constructor to initializes some default values

Applies to
TColorManager

Declaration
constructor Create;

Description
Following standard values are set when a color conversion manager instance is created:

  • Source pixel format is set to RGB (SPP = 3, BPS = 8).
  • Target pixel format is set to BGR (SPP = 3, BPS = 8). This is the native Windows true color bitmap format.
  • File gamma is set to 1 and display gamma is set to 2.2 (DefaultDisplayGamma).


TColorManager.CreateColorPalette Method

CreateColorPalette method

creates a color palette

Applies to
TColorManager

Declaration
function CreateColorPalette(Data: array of Pointer; DataFormat: TRawPaletteFormat; ColorCount: Cardinal; RGB: Boolean): HPALETTE;

Description
This method accepts data which can be in various raw formats:

  • either interlaced or plane
  • 8 bits or 16 bits per component
  • in RGB or BGR order
  • with 3 or 4 components per entry (fourth is ignored)

ColorCount determines the number of color entries to create. If this number does not equal the number of palette entries which would result from the given target BPS resolution then the palette is adjusted accordingly to allow convertion between resolutions.

Note
For interlaced formats only one pointer needs to be passed in Data (only the first one is used) while for plane data 3 pointers are necessary (one pointer for each plane). If data is passed in interlaced format then RGB determines whether to assume this data as being in rgb or bgr order. In plane mode RGB is not used instead the three needed pointers must be given such that the pointer to red components is in Data[0], the green pointer is in Data[1] and the blue one in Data[2].


TColorManager.CreateGrayscalePalette Method

CreateGrayscalePalette method

creates a grayscale palette

Applies to
TColorManager

Declaration
function CreateGrayscalePalette(MinimumIsWhite: Boolean): HPALETTE;

Description
This method optionally applies gamma to each entry. MinimumIsWhite is True if the palette starts with white in index 0 decreasing to black while the index grows otherwise (and this is the usual case) a lower palette index has a lower brightness.


TColorManager.CreateYCbCrLookup Method

CreateYCbCrLookup method

internally used

Applies to
TColorManager

Declaration
procedure CreateYCbCrLookup;

Description
This methods creates some internally used tables which speed up YCbCr conversion significantly by avoiding floating point mathematics.


TColorManager.Error Method

Error method

displays an error message

Applies to
TColorManager

Declaration
procedure Error(const Msg: String);

Description
internal use only


TColorManager.GetPixelFormat Method

GetPixelFormat method

read method for SourcePixelFormat and TargetPixelFormat

Applies to
TColorManager

Declaration
function GetPixelFormat(Index: Integer): TPixelFormat;

Description

Internal use only. Use property for access.


TColorManager.PrepareConversion Method

PrepareConversion method

pepares the conversion depending on set color scheme and format values

Applies to
TColorManager

Declaration
procedure PrepareConversion;

Description
Depending on the source and target pixel and color formats a conversion function must be determined which actually carries out the conversion.


TColorManager.RowConvertBGR2BGR Method

RowConvertBGR2BGR method
core conversion routine for a row, internal use only

Applies to
TColorManager

Declaration
procedure RowConvertBGR2BGR(Source: array of Pointer; Target: Pointer; Count: Cardinal; Mask: Byte);

Description
Do not use this procedure directly.


TColorManager.RowConvertBGR2RGB Method

RowConvertBGR2RGB method
core conversion routine for a row, internal use only

Applies to
TColorManager

Declaration
procedure RowConvertBGR2RGB(Source: array of Pointer; Target: Pointer; Count: Cardinal; Mask: Byte);

Description
Do not use this procedure directly.


TColorManager.RowConvertCIELAB2BGR Method

RowConvertCIELAB2BGR method
core conversion routine for a row, internal use only

Applies to
TColorManager

Declaration
procedure RowConvertCIELAB2BGR(Source: array of Pointer; Target: Pointer; Count: Cardinal; Mask: Byte);

Description
Do not use this procedure directly.


TColorManager.RowConvertCIELAB2RGB Method

RowConvertCIELAB2RGB method
core conversion routine for a row, internal use only

Applies to
TColorManager

Declaration
procedure RowConvertCIELAB2RGB(Source: array of Pointer; Target: Pointer; Count: Cardinal; Mask: Byte);

Description
Do not use this procedure directly.


TColorManager.RowConvertCMYK2BGR Method

RowConvertCMYK2BGR method
core conversion routine for a row, internal use only

Applies to
TColorManager

Declaration
procedure RowConvertCMYK2BGR(Source: array of Pointer; Target: Pointer; Count: Cardinal; Mask: Byte);

Description
Do not use this procedure directly.


TColorManager.RowConvertCMYK2RGB Method

RowConvertCMYK2RGB method
core conversion routine for a row, internal use only

Applies to
TColorManager

Declaration
procedure RowConvertCMYK2RGB(Source: array of Pointer; Target: Pointer; Count: Cardinal; Mask: Byte);

Description
Do not use this procedure directly.


TColorManager.RowConvertGray Method

RowConvertGray method
core conversion routine for a row, internal use only

Applies to
TColorManager

Declaration
procedure RowConvertGray(Source: array of Pointer; Target: Pointer; Count: Cardinal; Mask: Byte);

Description
Do not use this procedure directly.


TColorManager.RowConvertIndexed8 Method

RowConvertIndexed8 method
core conversion routine for a row, internal use only

Applies to
TColorManager

Declaration
procedure RowConvertIndexed8(Source: array of Pointer; Target: Pointer; Count: Cardinal; Mask: Byte);

Description
Do not use this procedure directly.


TColorManager.RowConvertIndexedBoth16 Method

RowConvertIndexedBoth16 method
core conversion routine for a row, internal use only

Applies to
TColorManager

Declaration
procedure RowConvertIndexedBoth16(Source: array of Pointer; Target: Pointer; Count: Cardinal; Mask: Byte);

Description
Do not use this procedure directly.


TColorManager.RowConvertIndexedSource16 Method

RowConvertIndexedSource16 method
core conversion routine for a row, internal use only

Applies to
TColorManager

Declaration
procedure RowConvertIndexedSource16(Source: array of Pointer; Target: Pointer; Count: Cardinal; Mask: Byte);

Description
Do not use this procedure directly.


TColorManager.RowConvertIndexedTarget16 Method

RowConvertIndexedTarget16 method
core conversion routine for a row, internal use only

Applies to
TColorManager

Declaration
procedure RowConvertIndexedTarget16(Source: array of Pointer; Target: Pointer; Count: Cardinal; Mask: Byte);

Description
Do not use this procedure directly.


TColorManager.RowConvertPhotoYCC2BGR Method

RowConvertPhotoYCC2BGR method
core conversion routine for a row, internal use only

Applies to
TColorManager

Declaration
procedure RowConvertPhotoYCC2BGR(Source: array of Pointer; Target: Pointer; Count: Cardinal; Mask: Byte);

Description
Do not use this procedure directly.


TColorManager.RowConvertPhotoYCC2RGB Method

RowConvertPhotoYCC2RGB method
core conversion routine for a row, internal use only

Applies to
TColorManager

Declaration
procedure RowConvertPhotoYCC2RGB(Source: array of Pointer; Target: Pointer; Count: Cardinal; Mask: Byte);

Description
Do not use this procedure directly.


TColorManager.RowConvertRGB2BGR Method

RowConvertRGB2BGR method
core conversion routine for a row, internal use only

Applies to
TColorManager

Declaration
procedure RowConvertRGB2BGR(Source: array of Pointer; Target: Pointer; Count: Cardinal; Mask: Byte);

Description
Do not use this procedure directly.


TColorManager.RowConvertRGB2RGB Method

RowConvertRGB2RGB method
core conversion routine for a row, internal use only

Applies to
TColorManager

Declaration
procedure RowConvertRGB2RGB(Source: array of Pointer; Target: Pointer; Count: Cardinal; Mask: Byte);

Description
Do not use this procedure directly.


TColorManager.RowConvertYCbCr2BGR Method

RowConvertYCbCr2BGR method
core conversion routine for a row, internal use only

Applies to
TColorManager

Declaration
procedure RowConvertYCbCr2BGR(Source: array of Pointer; Target: Pointer; Count: Cardinal; Mask: Byte);

Description
Do not use this procedure directly.


TColorManager.RowConvertYCbCr2RGB Method

RowConvertYCbCr2RGB method
core conversion routine for a row, internal use only

Applies to
TColorManager

Declaration
procedure RowConvertYCbCr2RGB(Source: array of Pointer; Target: Pointer; Count: Cardinal; Mask: Byte);

Description
Do not use this procedure directly.


TColorManager.SetGamma Method

SetGamma method

Used to set the gamma value(s) which should be used to create the gamma lookup table.

Applies to
TColorManager

Declaration
procedure SetGamma(MainGamma: Single; DisplayGamma: Single = DefaultDisplayGamma);

Description

Note
Setting gamma values does not enable gamma application. Include coApplyGamma into TargetOptions to actually use gamma correction.


TColorManager.SetSourceBitsPerSample Method

SetSourceBitsPerSample method

write method for SourceBitsPerSample

Applies to
TColorManager

Declaration
procedure SetSourceBitsPerSample(const Value: Byte);

Description

Internal use only. Use property for access.


TColorManager.SetSourceColorScheme Method

SetSourceColorScheme method

write method for SourceColorScheme

Applies to
TColorManager

Declaration
procedure SetSourceColorScheme(const Value: TColorScheme);

Description

Internal use only. Use property for access.


TColorManager.SetSourceSamplesPerPixel Method

SetSourceSamplesPerPixel method

write method for SourceSamplesPerPixel

Applies to
TColorManager

Declaration
procedure SetSourceSamplesPerPixel(const Value: Byte);

Description

Internal use only. Use property for access.


TColorManager.SetTargetBitsPerSample Method

SetTargetBitsPerSample method

write method for TargetBitsPerSample

Applies to
TColorManager

Declaration
procedure SetTargetBitsPerSample(const Value: Byte);

Description

Internal use only. Use property for access.


TColorManager.SetTargetColorScheme Method

SetTargetColorScheme method

write method for TargetColorScheme

Applies to
TColorManager

Declaration
procedure SetTargetColorScheme(const Value: TColorScheme);

Description

Internal use only. Use property for access.


TColorManager.SetTargetSamplesPerPixel Method

SetTargetSamplesPerPixel method

write method for TargetSamplesPerPixel

Applies to
TColorManager

Declaration
procedure SetTargetSamplesPerPixel(const Value: Byte);

Description

Internal use only. Use property for access.


TColorManager.SetYCbCrParameters Method

SetYCbCrParameters method

sets parameters needed to convert to and from YCbCr color scheme

Applies to
TColorManager

Declaration
procedure SetYCbCrParameters(Values: array of Single; HSubSampling, VSubSampling: Byte);

Description

This special method is used only when you need to work with the YCbCr color format (or one of its derivations like PhotoYCC). It is used to set parameters which are needed in the conversion process.

Parameter Values represents a list of YCbCr coefficients which determine the calculation of the luminance value Y from RGB values. The following table shows which coefficients usually are used:

CCIR Recommendation | Color scheme | Luminance coefficients
Rec. 709 | PhotoYCC | 0.2125, 0.7154, 0.0721
Rec. 601-1 | YCbCr | 0.2990, 0.5870, 0.1140

By default Rec. 601-1 values are used.

Parameters HSubSampling and VSubSampling determine the subsampling of the chrominancies Cb and Cr vertically and horizontally. Subsampling means in this context that not for every luminance value also chrominance values are given (to improve compression). This is possible because the human eye is much more sensible for luminance changes than for chrominance changes. Only subsampling values of 1, 2 or 4 are allowed for horizontal and vertical subsampling where the vertical subsampling must always be less or equal the horizontal subsampling. A subsampling value of 1 means there is one chrominance pair for every luminance entry (which is effectively no subsampling at all), a factor of 2 means there is one chrominance pair for every second luminance value and finally a factor of 4 stands for one chrominance pair of every fourth luminance value. Similar relations are valid for vertical subsampling (here with lines instead of pixels).


TColorManager.SourceBitsPerSample Property

SourceBitsPerSample property
read or set number of bits of one source sample

Applies to
TColorManager

Declaration
Property SourceBitsPerSample : Byte;

Description

SourceBitsPerSample contains the number of bits which are used in the source data independent of the actual number of samples. For a table of pixel formats see TargetPixelFormat.

Allowed values are 1, 2, 4, 8 and 16.


TColorManager.SourceColorScheme Property

SourceColorScheme property
read or set source color schemes

Applies to
TColorManager

Declaration
Property SourceColorScheme : TColorScheme;

Description

This property determines how to interpret the incoming data values. Together with SourceBitsPerSample and SourceSamplesPerPixel a unique characterization of the source color data can be made and the correct conversion function can be invoked. Please see also TargetPixelFormat for a table which shows the dependencies between color schemes and pixel resolutions.

See Also

  • SourceBitsPerSamples, SourceSamplesPerPixel


TColorManager.SourceOptions Property

SourceOptions property

determines processing options for source color data

Applies to
TColorManager

Declaration
Property SourceOptions : TConvertOptions;

Description

Usually preprocessing of source data is not needed unless the format is not in a form which can directly be used in color conversion (e.g. byte swap for big endian source data) or some modifications need to be made in advance (e.g. offset application for different ranges).


TColorManager.SourcePixelFormat Property

SourcePixelFormat property

used to retrieve a pixelformat value

Applies to
TColorManager

Declaration
Property SourcePixelFormat : TPixelFormat;

Description

This read only property can be used to let the color manager determine a pixelformat which corresponds to the set bits per sample and samples per pixel values. In contrast to TargetPixelFormat the source format is seldom used because it is a rather informative value.

See Also

  • SourceBitsPerSample, SourceSamplesPerPixel, TargetPixelFormat


TColorManager.SourceSamplesPerPixel Property

SourceSamplesPerPixel property
read or set number of samples of one source pixel

Applies to
TColorManager

Declaration
Property SourceSamplesPerPixel : Byte;

Description

SourceSamplesPerPixel contains the number of samples which comprise one pixel in source data. For a table of pixel formats see TargetPixelFormat.

Allowed values are 1, 3 and 4.


TColorManager.TargetBitsPerSample Property

TargetBitsPerSample property
read or set the number of bits of one target sample

Applies to
TColorManager

Declaration
Property TargetBitsPerSample : Byte;

Description

TargetBitsPerSample contains the number of bits which are used in the target data independent of the actual number of samples. For a table of pixel formats see TargetPixelFormat.


TColorManager.TargetColorScheme Property

TargetColorScheme property
read or set target color schemes

Applies to
TColorManager

Declaration
Property TargetColorScheme : TColorScheme;

Description

This property determines how to format the outgoing data values. Together with TargetBitsPerSample and TargetSamplesPerPixel a unique characterization of the target color format can be made and the correct conversion function can be invoked. Please see also TargetPixelFormat for a table which shows the dependencies between color schemes and pixel resolutions.

See Also

  • TargetBitsPerSamples, TargetSamplesPerPixel


TColorManager.TargetOptions Property

TargetOptions property

determines processing options for target color data

Applies to
TColorManager

Declaration
Property TargetOptions : TConvertOptions;

Description

In contrast to source data it is quite common to have some post processing of target pixel data. This involves gamma correction, byte swapping, resolution changes, alpha skipping etc.


TColorManager.TargetPixelFormat Property

TargetPixelFormat property

used to retrieve a pixelformat value

Applies to
TColorManager

Declaration
Property TargetPixelFormat : TPixelFormat;

Description

This read only property can be used to let the color manager determine a pixelformat which corresponds to the set bits per sample and samples per pixel values. This value is usually used for TBitmap.PixelFormat and is primarily determined by the number of bits per samples and samples per pixel. The multiplication of both values (as used in the ImageProperties property of TGraphicExGraphic) describes the amount of bits used for one pixel and is usually more often used to describe a pixel format, although it is sometimes not precise enough (e.g. 4 bits per pixel can be 4 samples each containing 1 bit (building so 4 planes) or can be 1 sample using 4 bit).

Below is a table which shows the relationship of various pixel formats and gives an overview in which color scheme a certain pixel format is used.

Bits per sample | Samples per pixel | Bits per pixel | Pixel format | Typical color schemes | Description
1 | 1 | 1 | pf1Bit | indexed (palette) | 2 colors or black and white
4 | 4 | pf4Bit | indexed (palette) | 16 colors (4 planes)
2 | 1 | 2 | pf4Bit (only 2 bits used) | indexed (palette) | 4 colors or gray levels
4 | 1 | 4 | pf4Bit | indexed (palette) | 16 colors or gray levels
5 | 3 | 15 | pf15Bit | RGB | 32768 colors (special format aka high color format, available also as pf16Bit where one sample gets one more bit (usually green) forming a 565 high color format)
8 | 1 | 8 | pf8Bit | indexed (palette) | 256 colors or gray levels
3 24 pf24Bit
  • RGB (BGR)
  • CIE L*a*b*
  • YCbCr
  • PhotoYCC
  • CMY
  • more not yet supported formats
         16 million colors (aka true color), widely used format but quite uneffective because of its unaligned pixel size of 3 bytes
4 | 32 | pf32Bit | RGBA (BGRA) | 16 million colors with alpha channel (sometimes also refered to as true color), the support for this format grows constantly and, although quite expensive in storage, it provides the best true color performance since all pixels are dword aligned
4 | 32 | not supported under Windows | CMYK | special color formats
16 | 1 | 16 | not supported under Windows | indexed (palette) | 65536 colors or gray levels
3 | 48 | not supported under Windows | RGB (BGR) | 2.81*10^14 colors
4 | 64 | not supported under Windows | RGBA (BGRA) | 2.81*10^14 colors with 16 bit alpha channel

Note: Grayscale formats usually have no palette but need one for display under Windows as there is no gray scale support.
Sometimes there are other formats used, e.g. scan programs might work with 12 bits per sample true color formats. Also 18 bits per sample are possible. All these formats, however, need to be scaled down to 8 bits per sample to display them under Windows.

See Also

  • TargetBitsPerSample, TargetSamplesPerPixel, ImageProperties


TColorManager.TargetSamplesPerPixel Property

TargetSamplesPerPixel property
read or set number of samples of one target pixel

Applies to
TColorManager

Declaration
Property TargetSamplesPerPixel : Byte;

Description

TargetSamplesPerPixel contains the number of samples which comprise one pixel in target data. For a table of pixel formats see TargetPixelFormat.

Allowed values are 1, 3 and 4.


TCUTGraphic.CanLoad Method

CanLoad method

Applies to
TCUTGraphic

Declaration
class function CanLoad(Stream: TStream): Boolean;


TCUTGraphic.LoadFromFile Method

LoadFromFile method

Applies to
TCUTGraphic

Declaration
procedure LoadFromFile(const FileName: String);


TCUTGraphic.LoadFromStream Method

LoadFromStream method

Applies to
TCUTGraphic

Declaration
procedure LoadFromStream(Stream: TStream);


TCUTGraphic.LoadPalette Method

LoadPalette method

Applies to
TCUTGraphic

Declaration
procedure LoadPalette;


TCUTGraphic.PaletteFile Property

PaletteFile property

Applies to
TCUTGraphic

Declaration
Property PaletteFile : String;


TCUTGraphic.ReadImageProperties Method

ReadImageProperties method

Applies to
TCUTGraphic

Declaration
function ReadImageProperties(Stream: TStream; ImageIndex: Cardinal): Boolean;


TCUTRLEDecoder.Decode Method

Decode method

see the common description in TDecoder

Applies to
TCUTRLEDecoder

Declaration
procedure Decode(var Source, Dest: Pointer; PackedSize, UnpackedSize: Integer);


TCUTRLEDecoder.Encode Method

Encode method

see the common description in TDecoder

Applies to
TCUTRLEDecoder

Declaration
procedure Encode(Source, Dest: Pointer; Count: Cardinal; var BytesStored: Cardinal);


TDecoder.Decode Method

Decode method

decompresses data

Applies to
TDecoder

Declaration
procedure Decode(var Source, Dest: Pointer; PackedSize, UnpackedSize: Integer);

Description
This method takes data from the input buffer Source which must at least contain PackedSize bytes, decompresses it and writes it to Dest which must at least have room for UnpackedSize bytes. Both Source as well as Dest might be advanced during this process but you should not generally assume this to happen because advancing is only used in some special cases (e.g. when using zLib). Make sure that you use intermediate variables if you rely on unaltered pointers (e.g. for freeing them). Decode might depend on some options or states so make sure the decoder is correctly set up.


TDecoder.DecodeEnd Method

DecodeEnd method

finalization method called to allow the class to clean its structures

Applies to
TDecoder

Declaration
procedure DecodeEnd;

Description
This method is used to clean up structures and memory which has been used during decoding. This is the perfect place to let additional libraries, which were involved in the decoding process, clean their structures too.


TDecoder.DecodeInit Method

DecodeInit method

initialization method called to allow the class to allocate memory, prepare structures etc.

Applies to
TDecoder

Declaration
procedure DecodeInit;

Description
DecodeInit allows to set up structures, allocate memory etc. which is necessary to actualy decompress. External libraries might be initialized here too.


TDecoder.Encode Method

Encode method

compresses data

Applies to
TDecoder

Declaration
procedure Encode(Source, Dest: Pointer; Count: Cardinal; var BytesStored: Cardinal);

Description
Counter part to Decode.


TDecoder.EncodeEnd Method

EncodeEnd method

finalization method called to allow the class to clean its structures

Applies to
TDecoder

Declaration
procedure EncodeEnd;

Description
Counter part to DecodeEnd.


TDecoder.EncodeInit Method

EncodeInit method

initialization method called to allow the class to allocate memory, prepare structures etc.

Applies to
TDecoder

Declaration
procedure EncodeInit;

Description
Counter part to DecodeInit.


TEPSGraphic.CanLoad Method

CanLoad method

Applies to
TEPSGraphic

Declaration
class function CanLoad(Stream: TStream): Boolean;


TEPSGraphic.LoadFromStream Method

LoadFromStream method

Applies to
TEPSGraphic

Declaration
procedure LoadFromStream(Stream: TStream);


TEPSGraphic.ReadImageProperties Method

ReadImageProperties method

Applies to
TEPSGraphic

Declaration
function ReadImageProperties(Stream: TStream; ImageIndex: Cardinal): Boolean;


TFileFormatList.Clear Method

Clear method

Clears the internal lists of registered image classes.

Applies to
TFileFormatList

Declaration
procedure Clear;


TFileFormatList.Create Method

Create method

Creates an instance of TFileformatList.

Applies to
TFileFormatList

Declaration
constructor Create;


TFileFormatList.Destroy Method

Destroy method

Destroys this file format list instance.

Applies to
TFileFormatList

Declaration
destructor Destroy;


TFileFormatList.FindExtension Method

FindExtension method

Returns the index of the extension entry which belongs to the given extension string.

Applies to
TFileFormatList

Declaration
function FindExtension(const Extension: String): Integer;


TFileFormatList.FindGraphicClass Method

FindGraphicClass method

Returns the class entry index which belongs to the given graphic class.

Applies to
TFileFormatList

Declaration
function FindGraphicClass(GraphicClass: TGraphicClass): Integer;


TFileFormatList.GetDescription Method

GetDescription method

Applies to
TFileFormatList

Declaration
function GetDescription(Graphic: TGraphicClass): String;


TFileFormatList.GetExtensionList Method

GetExtensionList method

Returns a list of strings for all extensions which are currently registered.

Applies to
TFileFormatList

Declaration
procedure GetExtensionList(List: TStrings);

Description
The entries contain no *. part. Just letters are returned.


TFileFormatList.GetGraphicFilter Method

GetGraphicFilter method

Creates a string which can directly be used in open or save dialogs.

Applies to
TFileFormatList

Declaration
function GetGraphicFilter(Formats: TFormatTypes; SortType: TFilterSortType; Options: TFilterOptions; GraphicClass: TGraphicClass): String;

Description
Formats may be used to limit the number of formats to return. SortType determines how to sort the entries. Options determines what should be included in the result string.

Usually all these options determine quite nicely which formats are well suited for a particular task but sometimes you may find it better to specify a graphic class to limit returned formats further. In this case set GraphicClass to the particular class otherwise set it nil.


TFileFormatList.GraphicFromContent Method

GraphicFromContent method

Applies to
TFileFormatList

Overloaded Variants
Function GraphicFromContent(const FileName: String): TGraphicExGraphicClass;
Function GraphicFromContent(Stream: TStream): TGraphicExGraphicClass;

Declaration
function GraphicFromContent(const FileName: String): TGraphicExGraphicClass;

Declaration
function GraphicFromContent(Stream: TStream): TGraphicExGraphicClass;


TFileFormatList.GraphicFromExtension Method

GraphicFromExtension method

Applies to
TFileFormatList

Declaration
function GraphicFromExtension(S: String): TGraphicClass;


TFileFormatList.RegisterFileFormat Method

RegisterFileFormat method

Registers the given graphic class with the passed extension string.

Applies to
TFileFormatList

Declaration
procedure RegisterFileFormat(const Extension, Common, Individual: String; FormatTypes: TFormatTypes; Replace, RegisterDefault: Boolean; GraphicClass: TGraphicClass);

Description
If there's already a class registered with this extension then either the registration of the older entry is replaced by the new one (Replace = True) or an exception is raised. This method takes also care to register the new extension with TPicture to make the default handling work too if RegisterDefault is True.

Further parameters are:

  • Extension: the new extension to be registered (not necessarily with only 3 characters, but without a period and letters only).
  • Common: a description string for all extensions registered with the same class used when several extensions are listed on one filter line. Pass '' to avoid changing a previously set value if there's one.
  • Individual: a description string used when each extension is listed separately.
  • FormatTypes: classifies the given file type as being a raster or vector file, with single or multiple images etc.
  • GraphicClass: the TGraphic descentant to be used to load and save the particular file.


TFileFormatList.UnregisterFileFormat Method

UnregisterFileFormat method

Removes the entry for the given extension from the internal list.

Applies to
TFileFormatList

Declaration
procedure UnregisterFileFormat(const Extension: String; GraphicClass: TGraphicClass);

Description
If Extension is '' then all associations for the given GraphicClass are removed otherwise the class is ignored and only the one particular extension is removed. Unregistration from TPicture is done here too, if necessary.


TGIFGraphic.CanLoad Method

CanLoad method

Applies to
TGIFGraphic

Declaration
class function CanLoad(Stream: TStream): Boolean;


TGIFGraphic.LoadFromStream Method

LoadFromStream method

Applies to
TGIFGraphic

Declaration
procedure LoadFromStream(Stream: TStream);


TGIFGraphic.ReadImageProperties Method

ReadImageProperties method

Applies to
TGIFGraphic

Declaration
function ReadImageProperties(Stream: TStream; ImageIndex: Cardinal): Boolean;


TGIFGraphic.SkipExtensions Method

SkipExtensions method

Applies to
TGIFGraphic

Declaration
function SkipExtensions: Byte;


TGIFLZWDecoder.Create Method

Create method

Applies to
TGIFLZWDecoder

Declaration
constructor Create(InitialCodeSize: Byte);


TGIFLZWDecoder.Decode Method

Decode method

see the common description in TDecoder

Applies to
TGIFLZWDecoder

Declaration
procedure Decode(var Source, Dest: Pointer; PackedSize, UnpackedSize: Integer);


TGIFLZWDecoder.Encode Method

Encode method

see the common description in TDecoder

Applies to
TGIFLZWDecoder

Declaration
procedure Encode(Source, Dest: Pointer; Count: Cardinal; var BytesStored: Cardinal);


TGraphicExGraphic.Assign Method

Assign method

Applies to
TGraphicExGraphic

Declaration
procedure Assign(Source: TPersistent);


TGraphicExGraphic.CanLoad Method

CanLoad method

Applies to
TGraphicExGraphic

Overloaded Variants
Function CanLoad(const FileName: String): Boolean;
Function CanLoad(Stream: TStream): Boolean;

Declaration
class function CanLoad(const FileName: String): Boolean;

Declaration
class function CanLoad(Stream: TStream): Boolean;


TGraphicExGraphic.ColorManager Property

ColorManager property

Applies to
TGraphicExGraphic

Declaration
Property ColorManager : TColorManager;


TGraphicExGraphic.Create Method

Create method

Creates an instance of TGraphicExGraphic.

Applies to
TGraphicExGraphic

Declaration
constructor Create;

Description
Creating an instance of this class directly might be useful in one circumstance: adding a color manager and resource load methods to TBitmap.


TGraphicExGraphic.Destroy Method

Destroy method

Destroys the instance.

Applies to
TGraphicExGraphic

Declaration
destructor Destroy;


TGraphicExGraphic.ImageProperties Property

ImageProperties property

Applies to
TGraphicExGraphic

Declaration
Property ImageProperties : TImageProperties;


TGraphicExGraphic.LoadFromResourceID Method

LoadFromResourceID method
Loads an image from the resource with the given ID.

Applies to
TGraphicExGraphic

Declaration
procedure LoadFromResourceID(Instance: THandle; ResID: Integer);

Description
This is essentially the same as LoadFromResourceName but uses an integer id instead of a name.


TGraphicExGraphic.LoadFromResourceName Method

LoadFromResourceName method

Loads an image from the resource with the given name.

Applies to
TGraphicExGraphic

Declaration
procedure LoadFromResourceName(Instance: THandle; const ResName: String);

Description
By setting Instance to 0 the resource of the executable is searched for ResName. If you want to load from other modules (DLLs etc.) then pass there module handle (as from LoadLibrary) to this method. Note that LoadFromResourceName does not automatically pick the correct graphic class to load an image. You must explicitly create the correct class (like TTIFFGraphic) and call its LoadFromResourceName method.


TGraphicExGraphic.ReadImageProperties Method

ReadImageProperties method

Applies to
TGraphicExGraphic

Declaration
function ReadImageProperties(Stream: TStream; ImageIndex: Cardinal): Boolean;


TLZ77Decoder.AvailableInput Property

AvailableInput property

number of not yet used input bytes

Applies to
TLZ77Decoder

Declaration
Property AvailableInput : Integer;

Description
This property is a "reach-through" of the same named member of the internal zLib stream variable which determines how many bytes are still available for the next decompression process.


TLZ77Decoder.AvailableOutput Property

AvailableOutput property

number of not yet used output bytes

Applies to
TLZ77Decoder

Declaration
Property AvailableOutput : Integer;

Description
This property is a "reach-through" of the same named member of the internal zLib stream variable which determines how many bytes are still available in the output buffer.


TLZ77Decoder.Create Method

Create method

Applies to
TLZ77Decoder

Declaration
constructor Create(FlushMode: Integer; AutoReset: Boolean);


TLZ77Decoder.Decode Method

Decode method

see the common description in TDecoder

Applies to
TLZ77Decoder

Declaration
procedure Decode(var Source, Dest: Pointer; PackedSize, UnpackedSize: Integer);


TLZ77Decoder.DecodeEnd Method

DecodeEnd method

see the common description in TDecoder

Applies to
TLZ77Decoder

Declaration
procedure DecodeEnd;


TLZ77Decoder.DecodeInit Method

DecodeInit method

see the common description in TDecoder

Applies to
TLZ77Decoder

Declaration
procedure DecodeInit;


TLZ77Decoder.Encode Method

Encode method

see the common description in TDecoder

Applies to
TLZ77Decoder

Declaration
procedure Encode(Source, Dest: Pointer; Count: Cardinal; var BytesStored: Cardinal);


TLZ77Decoder.GetAvailableInput Method

GetAvailableInput method

read method for property AvailableInput

Applies to
TLZ77Decoder

Declaration
function GetAvailableInput: Integer;


TLZ77Decoder.GetAvailableOutput Method

GetAvailableOutput method

read method for property AvailableOutput

Applies to
TLZ77Decoder

Declaration
function GetAvailableOutput: Integer;


TLZ77Decoder.ZLibResult Property

ZLibResult property

result of the last zLib operation

Applies to
TLZ77Decoder

Declaration
Property ZLibResult : Integer;

Description
This property is set whenever a zLib operation happens and can be used to determine the outcome of the last decompression (inflate) operation.


TPackbitsRLEDecoder.Decode Method

Decode method

see the common description in TDecoder

Applies to
TPackbitsRLEDecoder

Declaration
procedure Decode(var Source, Dest: Pointer; PackedSize, UnpackedSize: Integer);


TPackbitsRLEDecoder.Encode Method

Encode method

see the common description in TDecoder

Applies to
TPackbitsRLEDecoder

Declaration
procedure Encode(Source, Dest: Pointer; Count: Cardinal; var BytesStored: Cardinal);


TPCDDecoder.Create Method

Create method

Applies to
TPCDDecoder

Declaration
constructor Create(Stream: TStream);


TPCDDecoder.Decode Method

Decode method

see the common description in TDecoder

Applies to
TPCDDecoder

Declaration
procedure Decode(var Source, Dest: Pointer; PackedSize, UnpackedSize: Integer);


TPCDDecoder.Encode Method

Encode method

see the common description in TDecoder

Applies to
TPCDDecoder

Declaration
procedure Encode(Source, Dest: Pointer; Count: Cardinal; var BytesStored: Cardinal);


TPCDGraphic.CanLoad Method

CanLoad method

Applies to
TPCDGraphic

Declaration
class function CanLoad(Stream: TStream): Boolean;


TPCDGraphic.LoadFromStream Method

LoadFromStream method

Applies to
TPCDGraphic

Declaration
procedure LoadFromStream(Stream: TStream);


TPCDGraphic.ReadImageProperties Method

ReadImageProperties method

Applies to
TPCDGraphic

Declaration
function ReadImageProperties(Stream: TStream; ImageIndex: Cardinal): Boolean;


TPCXGraphic.CanLoad Method

CanLoad method

Applies to
TPCXGraphic

Declaration
class function CanLoad(Stream: TStream): Boolean;


TPCXGraphic.LoadFromStream Method

LoadFromStream method

Applies to
TPCXGraphic

Declaration
procedure LoadFromStream(Stream: TStream);


TPCXGraphic.ReadImageProperties Method

ReadImageProperties method

Applies to
TPCXGraphic

Declaration
function ReadImageProperties(Stream: TStream; ImageIndex: Cardinal): Boolean;


TPCXRLEDecoder.Decode Method

Decode method

see the common description in TDecoder

Applies to
TPCXRLEDecoder

Declaration
procedure Decode(var Source, Dest: Pointer; PackedSize, UnpackedSize: Integer);


TPCXRLEDecoder.Encode Method

Encode method

see the common description in TDecoder

Applies to
TPCXRLEDecoder

Declaration
procedure Encode(Source, Dest: Pointer; Count: Cardinal; var BytesStored: Cardinal);


TPNGGraphic.ApplyFilter Method

ApplyFilter method

Applies to
TPNGGraphic

Declaration
procedure ApplyFilter(Filter: Byte; Line, PrevLine, Target: PByte; BPP, BytesPerRow: Integer);


TPNGGraphic.BackgroundColor Property

BackgroundColor property

Applies to
TPNGGraphic

Declaration
Property BackgroundColor : TColor;


TPNGGraphic.CanLoad Method

CanLoad method

Applies to
TPNGGraphic

Declaration
class function CanLoad(Stream: TStream): Boolean;


TPNGGraphic.IsChunk Method

IsChunk method

Applies to
TPNGGraphic

Declaration
function IsChunk(ChunkType: TChunkType): Boolean;


TPNGGraphic.LoadAndSwapHeader Method

LoadAndSwapHeader method

Applies to
TPNGGraphic

Declaration
function LoadAndSwapHeader: Cardinal;


TPNGGraphic.LoadBackgroundColor Method

LoadBackgroundColor method

Applies to
TPNGGraphic

Declaration
procedure LoadBackgroundColor(const Description);


TPNGGraphic.LoadFromStream Method

LoadFromStream method

Applies to
TPNGGraphic

Declaration
procedure LoadFromStream(Stream: TStream);


TPNGGraphic.LoadIDAT Method

LoadIDAT method

Applies to
TPNGGraphic

Declaration
procedure LoadIDAT(const Description);


TPNGGraphic.LoadTransparency Method

LoadTransparency method

Applies to
TPNGGraphic

Declaration
procedure LoadTransparency(const Description);


TPNGGraphic.ReadDataAndCheckCRC Method

ReadDataAndCheckCRC method

Applies to
TPNGGraphic

Declaration
procedure ReadDataAndCheckCRC;


TPNGGraphic.ReadImageProperties Method

ReadImageProperties method

Applies to
TPNGGraphic

Declaration
function ReadImageProperties(Stream: TStream; ImageIndex: Cardinal): Boolean;


TPNGGraphic.ReadRow Method

ReadRow method

Applies to
TPNGGraphic

Declaration
procedure ReadRow(RowBuffer: Pointer; BytesPerRow: Integer);


TPNGGraphic.SetupColorDepth Method

SetupColorDepth method

Applies to
TPNGGraphic

Declaration
function SetupColorDepth(ColorType, BitDepth: Integer): Integer;


TPNGGraphic.Transparency Property

Transparency property

Applies to
TPNGGraphic

Declaration
Property Transparency : TByteArray;


TPPMGraphic.CanLoad Method

CanLoad method

Applies to
TPPMGraphic

Declaration
class function CanLoad(Stream: TStream): Boolean;


TPPMGraphic.CurrentChar Method

CurrentChar method

Applies to
TPPMGraphic

Declaration
function CurrentChar: Char;


TPPMGraphic.GetChar Method

GetChar method

Applies to
TPPMGraphic

Declaration
function GetChar: Char;


TPPMGraphic.GetNumber Method

GetNumber method

Applies to
TPPMGraphic

Declaration
function GetNumber: Cardinal;


TPPMGraphic.LoadFromStream Method

LoadFromStream method

Applies to
TPPMGraphic

Declaration
procedure LoadFromStream(Stream: TStream);


TPPMGraphic.ReadImageProperties Method

ReadImageProperties method

Applies to
TPPMGraphic

Declaration
function ReadImageProperties(Stream: TStream; ImageIndex: Cardinal): Boolean;


TPPMGraphic.ReadLine Method

ReadLine method

Applies to
TPPMGraphic

Declaration
function ReadLine: String;


TPSDGraphic.CanLoad Method

CanLoad method

Applies to
TPSDGraphic

Declaration
class function CanLoad(Stream: TStream): Boolean;


TPSDGraphic.LoadFromStream Method

LoadFromStream method

Applies to
TPSDGraphic

Declaration
procedure LoadFromStream(Stream: TStream);


TPSDGraphic.ReadImageProperties Method

ReadImageProperties method

Applies to
TPSDGraphic

Declaration
function ReadImageProperties(Stream: TStream; ImageIndex: Cardinal): Boolean;


TPSPGraphic.CanLoad Method

CanLoad method

Applies to
TPSPGraphic

Declaration
class function CanLoad(Stream: TStream): Boolean;


TPSPGraphic.LoadFromStream Method

LoadFromStream method

Applies to
TPSPGraphic

Declaration
procedure LoadFromStream(Stream: TStream);


TPSPGraphic.ReadImageProperties Method

ReadImageProperties method

Applies to
TPSPGraphic

Declaration
function ReadImageProperties(Stream: TStream; ImageIndex: Cardinal): Boolean;


TPSPRLEDecoder.Decode Method

Decode method

see the common description in TDecoder

Applies to
TPSPRLEDecoder

Declaration
procedure Decode(var Source, Dest: Pointer; PackedSize, UnpackedSize: Integer);


TPSPRLEDecoder.Encode Method

Encode method

see the common description in TDecoder

Applies to
TPSPRLEDecoder

Declaration
procedure Encode(Source, Dest: Pointer; Count: Cardinal; var BytesStored: Cardinal);


TRLADecoder.Decode Method

Decode method

see the common description in TDecoder

Applies to
TRLADecoder

Declaration
procedure Decode(var Source, Dest: Pointer; PackedSize, UnpackedSize: Integer);


TRLADecoder.Encode Method

Encode method

see the common description in TDecoder

Applies to
TRLADecoder

Declaration
procedure Encode(Source, Dest: Pointer; Count: Cardinal; var BytesStored: Cardinal);


TRLAGraphic.CanLoad Method

CanLoad method

Applies to
TRLAGraphic

Declaration
class function CanLoad(Stream: TStream): Boolean;


TRLAGraphic.LoadFromStream Method

LoadFromStream method

Applies to
TRLAGraphic

Declaration
procedure LoadFromStream(Stream: TStream);


TRLAGraphic.ReadImageProperties Method

ReadImageProperties method

Applies to
TRLAGraphic

Declaration
function ReadImageProperties(Stream: TStream; ImageIndex: Cardinal): Boolean;


TRLAGraphic.SwapHeader Method

SwapHeader method

Applies to
TRLAGraphic

Declaration
procedure SwapHeader(var Header);


TSGIGraphic.CanLoad Method

CanLoad method

Applies to
TSGIGraphic

Declaration
class function CanLoad(Stream: TStream): Boolean;


TSGIGraphic.LoadFromStream Method

LoadFromStream method

Applies to
TSGIGraphic

Declaration
procedure LoadFromStream(Stream: TStream);


TSGIGraphic.ReadAndDecode Method

ReadAndDecode method

Applies to
TSGIGraphic

Declaration
procedure ReadAndDecode(Red, Green, Blue, Alpha: Pointer; Row, BPC: Cardinal);


TSGIGraphic.ReadImageProperties Method

ReadImageProperties method

Applies to
TSGIGraphic

Declaration
function ReadImageProperties(Stream: TStream; ImageIndex: Cardinal): Boolean;


TSGIRLEDecoder.Create Method

Create method

Applies to
TSGIRLEDecoder

Declaration
constructor Create(SampleSize: Byte);


TSGIRLEDecoder.Decode Method

Decode method

see the common description in TDecoder

Applies to
TSGIRLEDecoder

Declaration
procedure Decode(var Source, Dest: Pointer; PackedSize, UnpackedSize: Integer);


TSGIRLEDecoder.Encode Method

Encode method

see the common description in TDecoder

Applies to
TSGIRLEDecoder

Declaration
procedure Encode(Source, Dest: Pointer; Count: Cardinal; var BytesStored: Cardinal);


TTargaGraphic.CanLoad Method

CanLoad method

Applies to
TTargaGraphic

Declaration
class function CanLoad(Stream: TStream): Boolean;


TTargaGraphic.LoadFromStream Method

LoadFromStream method

Applies to
TTargaGraphic

Declaration
procedure LoadFromStream(Stream: TStream);


TTargaGraphic.ReadImageProperties Method

ReadImageProperties method

Applies to
TTargaGraphic

Declaration
function ReadImageProperties(Stream: TStream; ImageIndex: Cardinal): Boolean;


TTargaGraphic.SaveToStream Method

SaveToStream method

Applies to
TTargaGraphic

Overloaded Variants
Procedure SaveToStream(Stream: TStream);
Procedure SaveToStream(Stream: TStream; Compressed: Boolean);

Declaration
procedure SaveToStream(Stream: TStream);

Declaration
procedure SaveToStream(Stream: TStream; Compressed: Boolean);


TTargaRLEDecoder.Create Method

Create method

Applies to
TTargaRLEDecoder

Declaration
constructor Create(ColorDepth: Cardinal);


TTargaRLEDecoder.Decode Method

Decode method
<

see the common description in TDecoder

Applies to
TTargaRLEDecoder

Declaration
procedure Decode(var Source, Dest: Pointer; PackedSize, UnpackedSize: Integer);


TTargaRLEDecoder.Encode Method

Encode method

see the common description in TDecoder

Applies to
TTargaRLEDecoder

Declaration
procedure Encode(Source, Dest: Pointer; Count: Cardinal; var BytesStored: Cardinal);


TThunderDecoder.Create Method

Create method

Applies to
TThunderDecoder

Declaration
constructor Create(Width: Cardinal);


TThunderDecoder.Decode Method

Decode method

see the common description in TDecoder

Applies to
TThunderDecoder

Declaration
procedure Decode(var Source, Dest: Pointer; PackedSize, UnpackedSize: Integer);


TThunderDecoder.Encode Method

Encode method

see the common description in TDecoder

Applies to
TThunderDecoder

Declaration
procedure Encode(Source, Dest: Pointer; Count: Cardinal; var BytesStored: Cardinal);


TTIFFGraphic.CanLoad Method

CanLoad method

Applies to
TTIFFGraphic

Declaration
class function CanLoad(Stream: TStream): Boolean;


TTIFFGraphic.FindTag Method

FindTag method

Applies to
TTIFFGraphic

Declaration
function FindTag(Tag: Cardinal; var Index: Cardinal): Boolean;


TTIFFGraphic.GetValue Method

GetValue method

Applies to
TTIFFGraphic

Overloaded Variants
Function GetValue(Stream: TStream; Tag: Cardinal; Default: Single = 0): Single;
Function GetValue(Tag: Cardinal; Default: Cardinal = 0): Cardinal;
Function GetValue(Tag: Cardinal; var Size: Cardinal; Default: Cardinal = 0): Cardinal;

Declaration
function GetValue(Stream: TStream; Tag: Cardinal; Default: Single = 0): Single;

Declaration
function GetValue(Tag: Cardinal; Default: Cardinal = 0): Cardinal;

Declaration
function GetValue(Tag: Cardinal; var Size: Cardinal; Default: Cardinal = 0): Cardinal;


TTIFFGraphic.GetValueList Method

GetValueList method

Applies to
TTIFFGraphic

Overloaded Variants
Procedure GetValueList(Stream: TStream; Tag: Cardinal; var Values: TByteArray);
Procedure GetValueList(Stream: TStream; Tag: Cardinal; var Values: TCardinalArray);
Procedure GetValueList(Stream: TStream; Tag: Cardinal; var Values: TFloatArray);

Declaration
procedure GetValueList(Stream: TStream; Tag: Cardinal; var Values: TByteArray);

Declaration
procedure GetValueList(Stream: TStream; Tag: Cardinal; var Values: TCardinalArray);

Declaration
procedure GetValueList(Stream: TStream; Tag: Cardinal; var Values: TFloatArray);


TTIFFGraphic.LoadFromStream Method

LoadFromStream method

Applies to
TTIFFGraphic

Declaration
procedure LoadFromStream(Stream: TStream);


TTIFFGraphic.ReadImageProperties Method

ReadImageProperties method

Applies to
TTIFFGraphic

Declaration
function ReadImageProperties(Stream: TStream; ImageIndex: Cardinal): Boolean;


TTIFFGraphic.SaveToStream Method

SaveToStream method

Applies to
TTIFFGraphic

Declaration
procedure SaveToStream(Stream: TStream);


TTIFFGraphic.SortIFD Method

SortIFD method

Applies to
TTIFFGraphic

Declaration
procedure SortIFD;


TTIFFGraphic.SwapIFD Method

SwapIFD method

Applies to
TTIFFGraphic

Declaration
procedure SwapIFD;


TTIFFJPEGDecoder.Create Method

Create method

Applies to
TTIFFJPEGDecoder

Declaration
constructor Create(Properties: Pointer);


TTIFFJPEGDecoder.Decode Method

Decode method

see the common description in TDecoder

Applies to
TTIFFJPEGDecoder

Declaration
procedure Decode(var Source, Dest: Pointer; PackedSize, UnpackedSize: Integer);


TTIFFJPEGDecoder.DecodeEnd Method

DecodeEnd method

see the common description in TDecoder

Applies to
TTIFFJPEGDecoder

Declaration
procedure DecodeEnd;


TTIFFJPEGDecoder.DecodeInit Method

DecodeInit method

see the common description in TDecoder

Applies to
TTIFFJPEGDecoder

Declaration
procedure DecodeInit;


TTIFFJPEGDecoder.Encode Method

Encode method

see the common description in TDecoder

Applies to
TTIFFJPEGDecoder

Declaration
procedure Encode(Source, Dest: Pointer; Count: Cardinal; var BytesStored: Cardinal);


TTIFFLZWDecoder.Decode Method

Decode method

see the common description in TDecoder

Applies to
TTIFFLZWDecoder

Declaration
procedure Decode(var Source, Dest: Pointer; PackedSize, UnpackedSize: Integer);


TTIFFLZWDecoder.Encode Method

Encode method

see the common description in TDecoder

Applies to
TTIFFLZWDecoder

Declaration
procedure Encode(Source, Dest: Pointer; Count: Cardinal; var BytesStored: Cardinal);


PImageProperties

PImageProperties Type

pointer to TImageProperties

Unit
GraphicEx

Declaration

PImageProperties = ^TImageProperties;


PJPEGState

PJPEGState Type
internally used data type

Unit
GraphicCompression

Declaration

PJPEGState = ^TJPEGState;


TByteArray

TByteArray Type

Internally used type

Unit
GraphicEx

Declaration

TByteArray = array of Byte;


TCardinalArray

TCardinalArray Type

Internally used type

Unit
GraphicEx

Declaration

TCardinalArray = array of Cardinal;


TChunkType

TChunkType Type

Internally used type

Unit
GraphicEx

Declaration

TChunkType = array[0..3] of Char;


TColorScheme

TColorScheme Type

enumeration which contains all supported color schemes

Unit
GraphicColor

Declaration

TColorScheme = (
    csUnknown,   // not (yet) defined color scheme
    csIndexed,   // any palette format
    csG,         // gray scale
    csGA,        // gray scale with alpha channel
    csRGB,       // red, green, blue
    csRGBA,      // RGB with alpha channel
    csBGR,       // RGB in reversed order (used under Windows)
    csBGRA,      // BGR with alpha channel (alpha is always the last component)
    csCMY,       // cyan, magenta, yellow (used mainly for printing processes)
    csCMYK,      // CMY with black
    csCIELab,    // CIE color format using luminance and chromaticities
    csYCbCr,     // another format using luminance and chromaticities
    csPhotoYCC   // a modified YCbCr version used for photo CDs
  );

Description
TColorScheme is used to describe the source and target color format between the color manager should convert image data. The most often used target formats are BGR and BGRA (sometimes also indexed formats) because these are natively supported under Windows.


TCompressionType

TCompressionType Type

describes the compression format used in an image file

Unit
GraphicEx

Declaration

TCompressionType = (
    ctUnknown,     // compression type is unknown
    ctNone,        // no compression at all
    ctRLE,         // run length encoding
    ctPackedBits,  // Macintosh packed bits
    ctLZW,         // Lempel-Zif-Welch
    ctFax3,        // CCITT T.4 (1d), also known as fax group 3
    ctFaxRLE,      // modified Huffman (CCITT T.4 derivative)
    ctFax4,        // CCITT T.6, also known as fax group 4
    ctFaxRLEW,     // CCITT T.4 with word alignment
    ctLZ77,        // Hufman inflate/deflate
    ctJPEG,        // TIF JPEG compression (new version)
    ctOJPEG,       // TIF JPEG compression (old version)
    ctThunderscan, // TIF thunderscan compression
    ctNext,
    ctIT8CTPAD,
    ctIT8LW,
    ctIT8MP,
    ctIT8BL,
    ctPixarFilm,
    ctPixarLog,
    ctDCS,
    ctJBIG,
    ctPCDHuffmann  // PhotoCD Hufman compression
  );


TConversionMethod

TConversionMethod Type

format of the method header for row conversion

Unit
GraphicColor

Declaration

TConversionMethod = procedure(Source: array of Pointer; Target: Pointer; Count: Cardinal; Mask: Byte) of object;

Description
TConversionMethod describes the format of the conversion method used for the procedure variable which holds the actual method reference. In order to increase conversion speed there is a private variable which gets the address of the conversion method which is determined whenever ConvertRow is called and at least one parameter has changed.


TConvertOptions

TConvertOptions Type

options used to control the conversion process

Unit
GraphicColor

Declaration

TConvertOptions = set of (
    coAlpha,          // alpha channel is to be considered (this value is usually automatically set depending on
                      // the color scheme)
    coApplyGamma,     // target only, gamma correction must take place
    coNeedByteSwap,   // endian switch needed
    coLabByteRange,   // CIE L*a*b* only, luminance range is from 0..255 instead 0..100
    coLabChromaOffset // CIE L*a*b* only, chrominance values a and b are given in 0..255 instead -128..127
  );

Description
TConversionOptions are used for source and target color data to describe additional aspects which need to be considered when converting.


TFilterOption

TFilterOption Type

used to specify file filter strings from TFileFormatList

Unit
GraphicEx

Declaration

TFilterOption = (
    foCompact,          // use the compact form in filter strings instead listing each extension on a separate line
    foIncludeAll,       // include the 'All image files' filter string
    foIncludeExtension  // add the extension to the description
  );


TFilterOptions

TFilterOptions Type

used to specify file filter strings from TFileFormatList

Unit
GraphicEx

Declaration

TFilterOptions = set of TFilterOption;


TFilterSortType

TFilterSortType Type

used to specify file filter strings from TFileFormatList

Unit
GraphicEx

Declaration

TFilterSortType = (
    fstNone,        // do not sort entries, list them as they are registered
    fstBoth,        // sort entries first by description then by extension
    fstDescription, // sort entries by description only
    fstExtension    // sort entries by extension only
  );


TFloatArray

TFloatArray Type

internally used type

Unit
GraphicEx

Declaration

TFloatArray = array of Single;


TFormatType

TFormatType Type

used to specify file filter strings from TFileFormatList

Unit
GraphicEx

Declaration

TFormatType = (
    ftAnimation,   // format contains an animation (like GIF or AVI)
    ftLayered,     // format supports multiple layers (like PSP, PSD)
    ftMultiImage,  // format can contain more than one image (like TIF or GIF)
    ftRaster,      // format is contains raster data (this is mainly used)
    ftVector       // format contains vector data (like DXF or PSP file version 4)
  );


TFormatTypes

TFormatTypes Type

used to specify file filter strings from TFileFormatList

Unit
GraphicEx

Declaration

TFormatTypes = set of TFormatType;


TGraphicExGraphicClass

TGraphicExGraphicClass Type

class reference type of TGraphicExGraphic

Unit
GraphicEx

Declaration

TGraphicExGraphicClass = class of TGraphicExGraphic;


TIFDEntry

TIFDEntry Type

internally used type

Unit
GraphicEx

Declaration

TIFDEntry = packed record
    Tag: Word;
    DataType: Word;
    DataLength: Cardinal;
    Offset: Cardinal;
  end;


TImageOptions

TImageOptions Type

describes additional properties of an image which can only be enabled or not

Unit
GraphicEx

Declaration

TImageOptions = set of (
    ioTiled,       // image consists of tiles not strips (TIF)
    ioBigEndian,   // byte order in values >= words is reversed (TIF, RLA, SGI)
    ioMinIsWhite,  // minimum value in grayscale palette is white not black (TIF)
    ioReversed,    // bit order in bytes is reveresed (TIF)
    ioUseGamma     // gamma correction is used
  );


TImageProperties

TImageProperties Type

record containing common image properties

Unit
GraphicEx

Declaration

TImageProperties = record
    Version: Cardinal;                 // TIF, PSP, GIF
    Options: TImageOptions;            // all images
    Width,                             // all images
    Height: Cardinal;                  // all images
    ColorScheme: TColorScheme;         // all images
    BitsPerSample,                     // all Images
    SamplesPerPixel,                   // all images
    BitsPerPixel: Byte;                // all images
    Compression: TCompressionType;     // all images
    FileGamma: Single;                 // RLA, PNG
    XResolution,
    YResolution: Single;               // given in dpi (TIF, PCX, PSP)
    Interlaced,                        // GIF, PNG
    HasAlpha: Boolean;                 // TIF, PNG

    // informational data, used internally and/or by decoders
    // TIF
    FirstIFD,
    PlanarConfig,                      // most of this data is needed in the JPG decoder
    CurrentRow,
    TileWidth,
    TileLength,
    BytesPerLine: Cardinal;
    RowsPerStrip: TCardinalArray;
    YCbCrSubSampling,
    JPEGTables: TByteArray;
    JPEGColorMode,
    JPEGTablesMode: Cardinal;
    CurrentStrip,
    StripCount,
    Predictor: Integer;

    // PCD
    Overview: Boolean;                 // true if image is an overview image
    Rotate: Byte;                      // describes how the image is rotated (aka landscape vs. portrait image)
    ImageCount: Word;                  // number of subimages if this is an overview image

    // GIF
    LocalColorTable: Boolean;          // image uses an own color palette instead of the global one

    // RLA
    BottomUp: Boolean;                 // images is bottom to top

    // PSD
    Channels: Byte;                    // up to 24 channels per image

    // PNG
    FilterMode: Byte;
  end;


TJPEGGeneral

TJPEGGeneral Type
internally used data type

Unit
GraphicCompression

Declaration

TJPEGGeneral = packed record
    case byte of
      0: (common: jpeg_common_struct);
      1: (d: jpeg_decompress_struct);
      2: (c: jpeg_compress_struct);
  end;


TJPEGState

TJPEGState Type
internally used data type

Unit
GraphicCompression

Declaration

TJPEGState = record
    General: TJPEGGeneral;                    // must be the first member here because we pass TJPEGState as
                                              // compress, decompress or common struct around to be able
                                              // to access our internal data
    Error: jpeg_error_mgr;                    // libjpeg error manager
    DestinationManager: jpeg_destination_mgr; // data dest for compression
    SourceManager: jpeg_source_mgr;           // data source for decompression
    HSampling,	                              // luminance sampling factors
    VSampling: Word;
    BytesPerLine: Cardinal;                   // decompressed bytes per scanline
    RawBuffer: Pointer;                       // source data
    RawBufferSize: Cardinal;
    // pointers to intermediate buffers when processing downsampled data
    DownSampleBuffer: array[0..MAX_COMPONENTS - 1] of JSAMPARRAY;
    ScanCount,	                              // number of 'scanlines' accumulated
    SamplesPerClump: Integer;
    JPEGTables: Pointer;                      // JPEGTables tag value, or nil
    JTLength: Cardinal;                       // number of bytes JPEGTables
    JPEGQuality,                              // compression quality level
    JPEGTablesMode: Integer;                  // what to put in JPEGTables
  end;


TPNGChunkHeader

TPNGChunkHeader Type

internally used type

Unit
GraphicEx

Declaration

TPNGChunkHeader = packed record
    Length: Cardinal;  // size of data (entire chunk excluding itself, CRC and type)
    ChunkType: TChunkType;
  end;


TRawPaletteFormat

TRawPaletteFormat Type

describes the accepted formats of raw palette data when converting it into a logical palette

Unit
GraphicColor

Declaration

TRawPaletteFormat = (
    pfInterlaced8Triple, // rgb triple with 8 bits per component
    pfInterlaced8Quad,   // rgb quad with 8 bits per component (fourth entry is reserved as in Windows' logical palette)
    pfPlane8Triple,      // 3 separate planes of data with 8 bits per component
    pfPlane8Quad,
    pfInterlaced16Triple,// rgb triple with 16 bits per component
    pfInterlaced16Quad,
    pfPlane16Triple,     // 3 separate planes of data with 16 bits per component
    pfPlane16Quad
  );

Description
The color manager can create palettes for you be it a gray scale or a color palette. For the color palette some palette entry data must be provided which can be stored in various ways. It can be 8 or 16 bits per color component, packed or planar and might contain extra data (forming so a color quad instead of a triple).


TResamplingFilter

TResamplingFilter Type

describes the filter type which should be used when stretching an image using the GraphicEx Stretch procedure

Unit
GraphicEx

Declaration

TResamplingFilter = (sfBox, sfTriangle, sfHermite, sfBell, sfSpline, sfLanczos3, sfMitchell);


TStateArray

TStateArray Type
internally used data type

Unit
GraphicCompression

Declaration

TStateArray = array of TStateEntry;


TStateEntry

TStateEntry Type
internally used data type

Unit
GraphicCompression

Declaration

TStateEntry = record
    NewState: array[Boolean] of Cardinal;
    RunLength: Integer;
  end;


TTIFFPalette

TTIFFPalette Type

internally used type

Unit
GraphicEx

Declaration

TTIFFPalette = array[0..787] of Word;


GraphicColor Unit Overview

GraphicColor Unit
Classes Types Routines Const

GraphicColor contains the implementation of the color conversion manager.

Description

Note
Throughout the entire document (and library) the acronyms SPP and BPP are used which stand for samples per pixel and bits per sample, respectively. A sample is declared as a part of a pixel and describes a component of which a pixel is composed. For instance in the RGB color scheme each pixel is composed of three samples, one for red, one for green and one for blue. For CMYK four samples are needed while for indexed formats only one is used.
The color conversion manager class is responsible for converting between these color schemes/formats:
  • RGB(A) (red, green, blue with or without alpha)
  • BGR(A) (blue, green, red with or without alpha)
  • CMY(K) (cyan, magenta, yellow with or without black)
  • CIE L*a*b* (using D65 white point)
  • PhotoYCC (luminance, chrominancies)
  • YCbCr (luminance, chrominancies)
  • indexed (palette based format)
  • grayscale (also implemented as indexed format with grayscale palette)
More formats are likely to be implemented in the future (like HSL, Yuv, CIE XYZ etc.). Additional tasks of the manager are:
  • coversions between bit depths (1, 2, 4, 8, 16 bits)
  • palette creation
  • gamma tables creation and application
  • masked pixel transfer for interlaced images
  • big endian swap
  • plane (also known as: planar) to interleaved (aka: interlaced) conversion (e.g. 3 separate input streams of red, green and blue can be converted to rgbrgbrgb...)
There would be a huge number of different conversion routines necessary if GraphicColor would support all possible source and target formats. Take only RGB to BGR (and back) conversions. They need 4 routines: RGB-RGB, RGB-BGR, BGR-RGB and BGR-BGR (not counted alpha values, possibly in source or target only). Now consider also sample size conversion, say from 16 to 8 bit (possibly with byte swap of the source data). This adds another 4 cases to each conversions from above (because gamma correction and interlacing might be necessary too) resulting in 16 conversion pathes just for RGB and BGR. Now imaging how this would extend to RGB-CIE L*a*b*, RGB-CMYK, RGB-YCbCr, BGR-CIE L*a*b* (etc. I think you got the idea) if there wouldn't be some limitations. The most important self limitations are:
  • SPP more than 1 (e.g. 3 for RGB and 4 for CMYK) are always considered as being 8 or 16 bits in size (BPS). This leaves out conversions e.g. from 15 bits packed RGB format (555) to other formats like 24 bits RGB (888).
  • BPS values for multi sample formats (RGB etc.) must be equal. This might be obvious but the TIF format allows to have varying BPS values.
  • Gamma correction is table based and so limited to 8 BPS formats. Indexed formats get their gamma correction via their palette (which is in 8 BPS format). This leaves out gamma correction for target formats with 16 BPS. Source format of this size are first scaled down to 8 BPS and then gamma corrected.
  • Conversion to 16 BPS grayscale target format with alpha is not implemented.
  • Target formats are always in interleaved mode written.
  • Source formats in planar mode must always be 8 or 16 BPS. This leaves out e.g. the 16 color format with 4 bits per pixel (4 BPS, 1 SPP) but each bit on a separate plane. Generally speaking, a plane must always correspond to a sample (color component).
  • Conversion between indexed and non-indexed formats is not implemented.
  • Conversion of indexed formats with extra/alpha channel(s) is not supported (some EPS preview images contain this quite uncommon format)

Classes
TColorManager

Converts image data between various color and pixel formats.

Types
TColorScheme | enumeration which contains all supported color schemes
TConversionMethod | format of the method header for row conversion
TConvertOptions | options used to control the conversion process
TRawPaletteFormat | describes the accepted formats of raw palette data when converting it into a logical palette

Routines
ClampByte | general support routine
MulDiv16 | general support routine

Global Constants
DefaultDisplayGamma

default value for display gamma


GraphicCompression Unit Overview

GraphicCompression Unit
Classes Types

GraphicCompression contains various encoder/decoder classes used to handle compressed data in the various image classes.

Description

Basically, there are only a couple of main compressions schemes. These are:

  • Lempel-Zif-Welch (LZW), this scheme is disabled by default
  • run length encoding (RLE)
  • CCITT T.4 (fax 3)
  • inflate/deflate (LZ77)
  • PCD Huffmann
  • TIF Thunderscan and
  • JPEG

Some of the compression schemes can also appear in different flavours, particularly the RLE scheme is quite often used, but each time with slight differences. Hence there must be classes for each of these flavours.

Classes
TCCITTDecoder | common base class for CCITT encoders/decoders
TCCITTFax3Decoder | specialized CCITT decoder
TCCITTMHDecoder | specialized CCITT decoder
TCUTRLEDecoder | RLE encoder/decoder for Dr. Halo CUT images
TDecoder | common base class for all encoder/decoder implementations
TGIFLZWDecoder | LZW encoder/decoder for GIF images
TLZ77Decoder | LZ77 encoder/decoder for TIF, PSP and PNG images
TPackbitsRLEDecoder | Macintosh packed bits RLE encoder/decoder
TPCDDecoder | modified Huffman encoder/decoder for PhotoCD images
TPCXRLEDecoder | RLE encoder/decoder for PCX images
TPSPRLEDecoder | RLE encoder/decoder for PSP images
TRLADecoder | RLE encoder/decoder for RLA images
TSGIRLEDecoder | RLE encoder/decoder for SGI images
TTargaRLEDecoder | RLE encoder/decoder for Truevision images
TThunderDecoder | Thunderscan encoder/decoder class for TIF images
TTIFFJPEGDecoder | JPEG encoder/decoder for TIF images
TTIFFLZWDecoder | LZW encoder/decoder for TIF images

Types
PJPEGState | internally used data type
TJPEGGeneral | internally used data type
TJPEGState | internally used data type
TStateArray | internally used data type
TStateEntry | internally used data type


GraphicEx Unit Overview

GraphicEx Unit
Classes Types Routines Vars

This is the main reference to GraphicEx and gives you an overview about all available image classes.

Description

Using GraphicEx to load images is really easy because of its seamless integration into the VCL. Typical code to load an image looks so:

   Image1.Picture.LoadFromFile(AnImageFileName);
Where Image1 is a TImage component as found in the component palette (page "Additional"). TPicture uses a polymorphic implementation to dynamically use the graphic class which corresponds to the given image type. Of course you don't need a TImage to use TPicture but using TImage frees you from the task to display the loaded image.

Another way, which allows more control over what is loaded is shown below. This code snippet is taken from the convert demo program included into the GraphicEx package.

procedure TMainForm.DoLoad(const FileName: String);

var
  Start: DWORD;
  GraphicClass: TGraphicExGraphicClass;
  Graphic: TGraphic;

begin
  Screen.Cursor := crHourGlass;
  try
    try
      Start := GetTickCount;
      // determine true file type from content rather than extension
      GraphicClass := FileFormatList.GraphicFromContent(FileName);
      if GraphicClass = nil then Image1.Picture.LoadFromFile(FileName)
                            else
      begin
        // GraphicFromContent always returns TGraphicExGraphicClass
        Graphic := GraphicClass.Create;
        Graphic.OnProgress := ImageLoadProgress;
        Graphic.LoadFromFile(FileName);
        Image1.Picture.Graphic := Graphic;
      end;
      Statusbar.Panels[0].Text := Format('%d x %d', [Image1.Picture.Width, Image1.Picture.Height]);
      Statusbar.Panels[1].Text := 'load time: ' + IntToStr(GetTickCount - Start) + 'ms';
      Statusbar.Panels[2].Text := FileName;
      FUpDownUpdating := True;
      WidthUpDown.Position := Image1.Picture.Width;
      HeightUpDown.Position := Image1.Picture.Height;
      FUpDownUpdating := False;
      PropertyItem.Enabled := True;
    except
      PropertyItem.Enabled := False;
      raise;
    end;
  finally
    Screen.Cursor := crDefault;
  end;
end;
The main advantage of loading images this way is that no file extension is used but instead the file content is examined to determine what image type is actually in the given file. Try renaming a tif file to gif or another extension which is recognized by GraphicEx. Then try loading it with the code shown here. You will see it will still the correct graphic class be created and the image will be loaded. Note: this mechanism does only work for file formats which can be loaded by code from the GraphicEx library. Thus ico or bmp files are not automatically recognized.

Classes
TAutodeskGraphic | Autodesk cel and pic images.
TCUTGraphic | Dr. Halo cut images
TEPSGraphic | Enhanced Postscript eps preview images
TFileFormatList | Graphic class manager
TGIFGraphic | Compuserve gif images
TGraphicExGraphic | Generic base class for all GraphicEx image classes
TPCDGraphic | Kodak Photo-CD pcd images
TPCXGraphic | ZSoft Paintbrush pcx and pcc images
TPNGGraphic | Portable Network Graphic png images
TPPMGraphic | Portable Pixel Map ppm, Gray Map pgm and Bit Map pbm images
TPSDGraphic | Photoshop psd and pdd images
TPSPGraphic | Paintshop Pro psp images
TRLAGraphic | Alias/Wavefront rla and rpf images
TSGIGraphic | SGI black & white bw, true color rgb(a) and sgi images
TTargaGraphic | Truevision tga, vst, isb, vda and win images
TTIFFGraphic | Tagged Image Format tif and tiff images

Types
PImageProperties | pointer to TImageProperties
TByteArray | Internally used type
TCardinalArray | Internally used type
TChunkType | Internally used type
TCompressionType | describes the compression format used in an image file
TFilterOption | used to specify file filter strings from TFileFormatList
TFilterOptions | used to specify file filter strings from TFileFormatList
TFilterSortType | used to specify file filter strings from TFileFormatList
TFloatArray | internally used type
TFormatType | used to specify file filter strings from TFileFormatList
TFormatTypes | used to specify file filter strings from TFileFormatList
TGraphicExGraphicClass | class reference type of TGraphicExGraphic
TIFDEntry | internally used type
TImageOptions | describes additional properties of an image which can only be enabled or not
TImageProperties | record containing common image properties
TPNGChunkHeader | internally used type
TResamplingFilter | describes the filter type which should be used when stretching an image using the GraphicEx Stretch procedure
TTIFFPalette | internally used type

Routines
Stretch

Global Variables
FileFormatList

global reference of the file formats list


GraphicStrings Unit Overview

GraphicStrings Unit
R-Strings

GraphicEx string resource.

Description
Contains every localizable string of the library. There are additional files (e.g. for german and russian) which can simply be used by renaming them to GraphicString.pas (make a backup before of the english resource, e.g. rename it to GraphicStringsEN.pas).

Resourcestrings
gesAliasWaveFront | 'Alias/Wavefront images'
gesAllImages | 'All images'
gesAutoDesk | 'Autodesk images'
gesBitmaps | 'Windows bitmaps'
gesCompression | 'Cannot load image. Compression error found in %s file.'
gesCompressionScheme | 'The compression scheme is'
gesCompuserve | 'CompuServe images'
gesConversionUnsupported | 'Color conversion failed. Could not find a proper method.'
gesDIBs | 'Device independant Windows bitmaps'
gesEnhancedMetaFiles | 'Windows enhanced meta files'
gesEPS | 'Encapsulated Postscript images'
gesExtraCompressedData | 'Cannot load image. Extra compressed data found in %s file.'
gesGFIFax | 'GFI fax images'
gesHalo | 'Dr. Halo images'
gesIcons | 'Windows icons'
gesIndexedNotSupported | 'Conversion between indexed and non-indexed pixel formats is not supported.'
gesInvalidColorFormat | 'Invalid color format in %s file.'
gesInvalidCRC | 'Cannot load image. CRC error found in %s file.'
gesInvalidImage | 'Cannot load image. Invalid or unexpected %s image format.'
gesInvalidPalette | 'Cannot load image. Palette in %s file is invalid.'
gesInvalidPixelDepth | 'Sample count per pixel does not correspond to the given color scheme.'
gesInvalidSampleDepth | 'Color depth is invalid. Bits per sample must be 1, 2, 4, 8 or 16.'
gesInvalidSubSampling | 'Subsampling value is invalid. Allowed are 1, 2 and 4.'
gesJFIFImages | 'JFIF images'
gesJPEGBogusTableField | 'Bogus JPEG tables field.'
gesJPEGComponentCount | 'Improper JPEG component count.'
gesJPEGDataPrecision | 'Improper JPEG data precision.'
gesJPEGEOI | 'JPEG decompression error. Unexpected end of input.'
gesJPEGFractionalLine | 'Fractional JPEG scanline unsupported.'
gesJPEGImages | 'JPEG images'
gesJPEGSamplingFactors | 'Improper JPEG sampling factors.'
gesJPEGStripSize | 'Improper JPEG strip/tile size.'
gesJPEImages | 'JPE images'
gesJPGImages | 'JPG images'
gesKodakPhotoCD | 'Kodak Photo-CD images'
gesLoadingData | 'Loading data...'
gesLZ77Error | 'LZ77 decompression error.'
gesMacTIFF | 'Macintosh TIFF images'
gesMetaFiles | 'Windows metafiles'
gesPaintShopPro | 'Paintshop Pro images'
gesPCTIF | 'PC TIF images'
gesPhotoshop | 'Photoshop images'
gesPortable | 'Portable map images'
gesPortableGray | 'Portable gray map images'
gesPortableMono | 'Portable bitmap images'
gesPortableNetworkGraphic | 'Portable network graphic images'
gesPortablePixel | 'Portable pixel map images'
gesPreparing | 'Preparing...'
gesPSPFileType | 'File versions other than 3 or 4 are'
gesRegistration | 'Attempt to register %s twice.'
gesRLAPixelFormat | 'Image formats other than RGB and RGBA are'
gesRLEBitmaps | 'Run length encoded Windows bitmaps'
gesSGI | 'SGI images'
gesSGIMono | 'SGI black/white images'
gesSGITrueColor | 'SGI true color images'
gesSGITrueColorAlpha | 'SGI true color images with alpha'
gesStreamReadError | 'Stream read error in %s file.'
gesTIFF | 'Tagged image file format images'
gesTransfering | 'Transfering...'
gesTruevision | 'Truevision images'
gesUnknownCriticalChunk | 'Cannot load PNG image. Unexpected but critical chunk detected.'
gesUnsupportedFeature | 'Cannot load image. %s not supported for %s files.'
gesUnsupportedImage | 'Cannot load image. Unsupported %s image format.'
gesUpsampling | 'Upsampling...'
gesVerticalSubSamplingError | 'Vertical subsampling value must be <= horizontal subsampling value.'
gesWarning | 'Warning'
gesZSoft | 'ZSoft Paintbrush images'
gesZSoftWord | 'Word 5.x screen capture images'


GraphicColor Dependencies

Uses
(* - indirectly, bold - interface)

Graphics, GraphicStrings, Math, SysUtils, Windows

Used by
(* - indirectly, bold - interface)

GraphicCompression, GraphicEx


GraphicCompression Dependencies

Uses
(* - indirectly, bold - interface)

Classes, GraphicColor, GraphicEx, Graphics, GraphicStrings, JPG, Math, MZLib, SysUtils, Windows

Used by
(* - indirectly, bold - interface)

GraphicEx


GraphicEx Dependencies

Uses
(* - indirectly, bold - interface)

Classes, Consts, ExtCtrls, GraphicColor, GraphicCompression, Graphics, GraphicStrings, JPEG, Math, MZLib, SysUtils, Windows

Used by
(* - indirectly, bold - interface)

GraphicCompression


GraphicStrings Dependencies

Uses
(* - indirectly, bold - interface)

Used by
(* - indirectly, bold - interface)

GraphicColor, GraphicCompression, GraphicEx


FileFormatList Variable

FileFormatList Global Variable

global reference of the file formats list

Unit
GraphicEx

Declaration
FileFormatList : TFileFormatList;