Your Download has Started!
Skip to main content

Download Graphics

Downloads DataFlex Graphics
Back to overview


Data Access Europe created the Graphics Library for use with DataFlex. With the Graphics Library attached to your application workspace you can display pictures in many nowadays popular graphic formats. The graphic formats supported are Bitmaps (BMP), Icons (ICO), Graphic Interchange Format (GIF). Joint Photographic Experts Group (JPG), Exchangeable Image File Format (EXF), Portable Network Graphics (PNG), Tagged Image File Format (TIFF), Windows Metafile (WMF) and Windows Enhanced Metafile (EMF).

The Graphics Library uses Microsoft Windows GDI+ functions and the classes therefore do not rely on an installed ActiveX.

Library & Examples

The installer executable that you can download installs both the library workspace as well as an examples workspace. In the examples workspace you will find two projects. The GraphicsDemo project is database aware and shows the pictures of people and products where the filenames are stored in the record of a table. The second example, named ImageGallery, is an application that lets you browse thru the drives and folders on your computer and shows the images present in that folder in a large icon style view. You can determine the size of the pictures, whether there should be a shadow, black background, what formats to support etc. Clicking an image will open a popup dialog in which the picture will be shown in a usually bigger size. The dialog is resizable. Because the source code of both projects is delivered you can use it to study various techniques.


The ImageGallery example uses the Property Grid CodeJock COM component to display image properties. You cannot use this OCX royality free and need to purchase a license. After purchasing the license the class code needs to be updated to your version of the OCX.


  • 3 Demo workspaces (SQL, DataFlex embedded database)


Publisher: Data Access Worldwide Version: v3.4.1 for DataFlex 24.0 Publication: April 12, 2024 File size: 67.4 MB


Supported versions

  • DataFlex 2024 / 24.0
  • DataFlex 2023 / 23.0
  • DataFlex 2022 / 20.1
  • DataFlex 2019 / 19.1

 For support go to:




Prior versions

This version was developed and tested with DataFlex 24.0


Changes since version 3.2

  • Fixes for CodeJock 22.0
  • Removed image conversion to WMF/EMF/Icon as it is never available
  • New functions in the cGDIGraphicsPath class
  • New demo application to copy file names to the Windows clipboard
  • Removed error checking in Clipboard class IsFormatAvailable as it may cause errors


This version has been developed with DataFlex 2023 (v23.0) and is only supported for that version

Changes since 3.1

  • Added 5 constants for image property tags
  • Solved an Cannot convert UChar[] error
  • Suppressed two Ambigious Function warnings
  • CanPaste function in cImageContainer queried the clipboard to find out whether there was data to paste available. On newer Windows 10 and Windows 11 machines this caused an Element not found error.
  • Help file contains a library logo in the topic title bar
  • cGDITextureBrush class methods CreateTextureIA and CreateTextureIAI were wrongly defined a gpWrapMode parameter
  • The external_functions CreateCompatibleBitmap, BitBlt and OffSetRect (GDI.h.pkg) were removed as DataFlex 20.1 defines them in the framework


This version has been developed with DataFlex 2022 (v20.1) and is only supported for that version


  • cGDITextureBrush class methods CreateTextureIA and CreateTextureIAI were wrongly defined a gpWrapMode parameter


Version 3.1.1 has been developed with and is supported for DataFlex version 20.0 and is not supported for older or newer versions (without notice).

Version 3.1 Changes & Additions

New features

  • cGDIStringFormat class added
  • cGDIFont class added
  • cGDIFontFamily class added
  • cImageFormatMenuItem class added
  • Codecs Info Dialog component added
  • New CreateThumbnailFromImageDemo demo program
  • New cGDIImageDecoders and cGDIImageEncoders classes
  • ImageGallery demo application enhanced with image rotation option
  • Added package with language IDs


  • All code now 32/64 bit compliant
  • All code now Unicode compliant, including removal of StrToWStr, WStrToStr and WPStrToStr as they are no longer needed
  • Variable type changes such as address to pointer, integer to uinteger where needed
  • Shapes demo application extended with Drawstring example
  • Documentation with many changes
  • Technique of loading an image from disk, see pbLoadImageFromUCharArray
  • Pasting an image (from Clipboard) triggers the OnImageSelected event only when the save was successful
  • CodeJock property grid (used as demo in ImageGallery) updated from v12 to v18.3 (note: you are not allowed/licensed to use the component in your own applications without first purchasing a license with CodeJock Software
  • Imageproperties enhancements
  • Display of thumbnail image in properties grid
  • GraphicsAbout.dg enhanced
  • EditImage demo application restructured
  • cDbImageContainer class improved to avoid errors during object destruction
  • Renamed structs (like tBitmapInfoHeader -> tWinBitmapInfoHeader) to get in line with DataFlex
  • CloneMatrix returns a new DataFlex cGDIMatrix object instead of a pointer to a GDI+ Matrix object

Version 3.0.5 changes

  • Backport of pbLoadImageFromUCharArray from 3.1 to 3.0.5.
  • Property of cGDIPlus object.
  • Not documented in 3.0.5 help

Version 3.0.4 changes

  • Added DisplayNextPage and DisplayPreviousPage methods to the cImageContainer class to advance thru pages of a multi page TIFF file.
  • Updated ImageGallery application to show the use of DisplayNextPage and DisplayPreviousPage methods
  • Updated the documentation

Version 3.0.3 changes

  • Installer always tried to execute SQL script to create MSSQL demo database

Version 3.0.2 changes

  • SWS files for demo projects not installed when MSSQL example was skipped/deselected

Version 3.0.1 changes

  • Replaced DataFlex embedded database codemast.dat in MSSQL demo workspace with

Version 3.0 changes

  • DataFlex 19.1 code cleanup
  • Separation of code for use in Windows and Web applications
  • New GDI+ classes (cGDIMatrix, cGDITextureBrush, cGDIHatchBrush, cGraphicsContainer)
  • Completer GDI+ classes
  • Singleton GDIPlus object
  • Better support for BLOB image fields
  • 3 Demo workspaces (SQL, DataFlex embedded database, No Data)
  • New modern installer than can create the SQL demo database
  • New extended help file (installer copies this to the 19.1 Help files folder)
  • cClipBoard class for copying images (and other) from and to clipboard
  • GPS Longitude / Latitude support
  • Images are no longer hold open by GDI+ when viewing by using a different open technique

Version 3.0 has been developed with and is supported for DataFlex version 19.1 and is not supported for older or newer versions (without notice).

Changes between 2.4 and 2.6

  • Library:
    • Added functions DPIX and DPIY to the cGDIGraphics class. They can be used to convert a value in pixels to a value in inches
    • cdbImageContainer can now load and save an image from / to a database column (tested with Microsoft SQL)
    • Images can now be rotated
      • cGDIImage class extended with a RotateImage function (private function, called by RotateImage procedure)
      • cImageContainer class extended with a RotateImage procedure
    • cImageContainer extended with a SaveImageToFile and a SaveImageToStream method
    • tUUID struct added
    • UUID.h.pkg file added with a string to GUID conversion function and two GUID compare function
    • cHistogramContainer class added. Can be used to display image histograms
    • Dftimer usage replaced with cPaintNextFrameTimer (based on cTimer) usage
    • DefineGuid private function replaced by real GUID conversion function
    • Added cGDIImageEncoders class
    • Added meta data tags to separate classes between Windows and Web (most classes are Windows classes)
    • DrawLineReal function added to cGDIGraphics class (to be used with histograms)
    • Added Ole32.h.pkg for support to save and load from an image stream
  • Example workspace:
    • Demodata example now available for Microsoft SQL to show image from record.
      • You need to create the database via the GraphicsDemo.sql script file
      • You need to copy int-filelist.cfg over filelist.cfg (make a copy of filelist.cfg)
      • You need to change the connectionstring in MSSQLDRV.INT
      • The photo displayer object replaces the reference to the image column automatically based on the database driver
    • Datademo toolbar rotated and extended with option to save the image, rotate the image, get a histogram of the image
    • Added a histogram.dg component

The library is tested, meant to be used and licensed for use with DataFlex 18.0

Changes between 2.3 and 2.4

  • Library:
    • Added key assigments Key_Ctrl+Key_Minus and Key_Ctrl+Key_Plus for zoom-in and zoom-out to cImageContainer class.
    • Implemented a pbShowScrollbars property
    • Removed the need for the conversions library by copying the cHexHandler.Pkg in the Graphics Libary
    • Removed the packages RECT, POINT and SCROLLINFO as there struct definitions are in tWinStructs.Pkg
    • Renamed BitmapInfo to tWinBitmapInfo, BitmapInfoHeader to tWinBitmapInfoHeader, RGBQuad to tRGBQuad, PaintStruct to tWinPaint
    • Included shift.pkg for RShift and LShift functions

    The library is tested, meant to be used and licensed for use with DataFlex 17.0

Changes between 2.2 and 2.3

  • Library:
    • Multi-page TIF files triggered the animated GIF code to execute. That caused an error.
    • Library sws renamed from GraphicsLibrary.sws to Graphics.sws; in line with other libraries
    • ImagePixelFormat function with support functions and constants added. For usage check the ImageZoomedDialog.dg

The library is tested and meant to be used with DataFlex 16.1

Changes between 2.1 and 2.2

  • Library:
    • External references in cImageContainer fixed. It used definitions from Cursor.pkg and missed File_Dlg.pkg
    • cDbImageContainer: When the changed_state of the object is changed and the object is properly connected to a DDO the changed state of the field will be set to the same changed state

The library is tested and meant to be used with DataFlex 16.0

See older versions