AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TechTalks
AWare Systems on-line

Custom development
    Format from data
    Tiling versus banding
    VCL TGraphic basics
    Unused color


  English version
  Nederlandse versie



Valid HTML 4.01!

Delphi graphics and imaging related issues

These are mostly unrelated discussions of mainly Delphi graphics and imaging related topics that have popped up and were answered by an AWare Systems programmer in newsgroups like New topic will be added periodically. Please drop us a line if you wish to receive notification of such updates.

Format from data
Sometimes coders find themselves in situations where they've got data to handle, but have no clue as to what specific file format the data is packed in. This happens most often in relation to database tables with image data in any of a number of image file formats. There is often no exact way to determine the file format, and the best solution is to avoid the problem. This being said, this topic offers a number of Delphi ObjectPascal functions that do about as good a job as possible, for a number of graphics and other formats...

Tiling versus banding
There are two well-known techniques to handle big images. Both serve the purpose to avoid huge single-chunk memory allocations by splitting up the complete raster. Banding is the act of splitting up the raster in horizontal chunks, tiling is splitting it up in more or less square regions. This TechTalk compares both techniques, and concludes that tiling is obviously the better one.

VCL TGraphic basics
There seems to be a lot of confusion about the very basics of Delphi Visual Component Library graphics. The actual intention of the TGraphic design is poorly understood, design-wise corrupted by the non-fitting TBitmap, badly documented, and very often confused with the functionality of a TImage. It is nevertheless a very fine design. This TechTalk aimes at explaining what these graphics classes are, and how they are related.

Unused color
Coders often need to assemble bitmaps on a background or such, and to this purpose, they may need their code to find an unused color that it can next use to encode transparency. While this unused color detection is straightforward for bitdepths smaller than 24, the same straightforward algorithm applied to pf24bit or pf32bit TBitmap's is extremely slow. This TechTalk deals with the problem, elaborates on another way to find the unused color when bitdepth does equal 24, and presents ready to copy and paste code to handle the job for pf16bit and pf24bit TBitmap's.