| Herd Software Development
|=
DaVinci Graphics Library
|==
DaVinci Documentation Home Search Order


Notes on image editing

Functions for direct manipulation of DIB data are assigned to the Leonardo module (LEON3xxx.DLL) of the DaVinci graphics library.

Windows' internal image processing functions

While Windows' own API contains a myriad of useful, ready-to-use functions for image processing, ranging from stretching, mirroring, patterning and printing, these functions were, for the most part, designed to be executed on a device context (DC) rather than on an image stored in memory. (See Image editing with Windows API functions.

OWL, Delphi and other object-oriented environments

Object-oriented platforms ranging from Borland's OWL and Object Pascal to Microsoft Foundation Classes (MFC) usually provide abstract methods of accessing API-based image manipulation functions, thus removing a lot of the tedium and gruntwork involved in developing image processing routines. Virtually all object-oriented platforms work with DIBs via the handle, or HDIB, of the DIB data in memory. Here's an example.

OWL 2.x:
{ TDib ADib(hDib);	// Creates an OWL TDib object for a HDIB handle returned from DaVinci
  TPalette APalette(ADib);	// Creates a palette from this object (Warning: raises an exception if the DIB is 24 Bit)
  TBitmap ABitmap(ADib, &APalette);	// Create (DDB) bitmap object...
}