Image Formats

TECH TIP: ReportBuilder Image Support

ReportBuilder natively supports Bitmap (.bmp), JPEG (.jpg, .jpeg), Metafile (.wmf, .emf), Gif (.gif), and Icon (.ico) image formats.  PNG (.png) images are supported for Delphi 2009 or later.

ReportBuilder has an open architecture that supports any TGraphic descendant.

For example, for versions of Delphi earlier than Delphi 2007, ReportBuilder ships with a freeware component called GIFImage that can be used with ReportBuilder to print .gif images. (see the main report demo app for an example.)

There is another freeware component called GraphicEx that
supports several additional formats – including tiff, targa, and autodesk.

It can be downloaded from:

http://www.soft-gems.net/index.php/libs/graphicex-library
ReportBuilder can easily support TGraphic descendants with a simple register call.

Below is the code to our ppGIF.pas unit which ‘uses’ and registers the freeware GIFImage component.  A similar file would need to be created for each new image type added from a third party library.

{********************************************************************}
{                                                                    }
{                   ReportBuilder Report Component Library           }
{                                                                    }
{             Copyright (c) 1996, 2000 Digital Metaphors Corporation }
{                                                                    }
{********************************************************************}

unit ppGIF;

interface

{$I ppIfDef.pas}

uses
  ppCtrls, GIFImage;

implementation

{***************************************************************
 *
 ** I N I T I A L I Z A T I O N   /   F I N A L I Z A T I O N
 *
{****************************************************************}

initialization

  ppRegisterGraphicClass('GIF', TGIFImage);

finalization

  ppUnRegisterGraphicClass(TGIFImage);

end.