Next: Other parts of the DIB Utilities implementation, Previous: Device Independent Bitmap Utilities, Up: Device Independent Bitmap Utilities
The following procedures have typed parameters, using the same
convention as windows-procedure.
Return type: dib. Calls the
OpenDIBentry of DIBUTILS.DLL. If the return value is not#fthen the file filename was found, successfully opened, and the contents were suitable for loading into memory as a device independent bitmap.
Return type: bool. Calls the
WriteDIBentry of DIBUTILS.DLL. Returns#tif the file filename could be opened and written to. After this operation the file contains the bitmap data in a standard format that is understood byopen-diband various system utilities like the bitmap editor. Any problems resulting in failure are signalled by a#freturn value.
Return type: hbitmap. Calls the
BitmapFromDibentry of DIBUTILS.DLL. The returned value is a device dependent bitmap. The colours from the DIB are matched against colors in palette.
Return type: dib. Returns a DIB containing the same image as the device dependent bitmap bitmap. Style determines the kind of DIB, e.g. compression style. Calls the
DibFromBitmapentry of DIBUTILS.DLL.
Return type: bool. Calls the
DibBltentry of DIBUTILS.DLL. Similar to the Win32 APIBitBltcall, but draws a DIB rather than a piece of another device context. Draws the dib on device context hdc at position (x,y). A rectangle of width w and height h is copied from position (src-x,src-y) of dib. Raster-op is supposed to allow the source and destination to be combined but I don't think I got this right so stick toSRCCOPY.
Return type: bool. This procedure reclaims the storage occupied by a DIB. After being deleted, the DIB should not be used. This procedure allows the programmer to reclaim external heap storage rather than risking it running out before the next garbage collection.
Return type: int. Calls the
DibHeightexpand entry of DIBUTILS.DLL, which returns the height of the bitmap in pixels.
Return type: int. Calls the
DibWidthentry of DIBUTILS.DLL, which returns the width of the bitmap in pixels.
Return type: hbitmap. Calls the
CopyBitmapof DIBUTILS.DLL, which creates a new bitmap with the same size and contents as the original.
Return type: dib. Calls the
CreateDIBentry of DIBUTILS.DLL. Creates a DIB of width by height pixels and depth bits of colour information. The style parameter determines how the bitmap is stored. I have only ever usedBI_RGB. If depth<=8 then the palette determines the DIB's colour table.
Return type: hbitmap. Calls the
CropBitmapentry of DIBUTILS.DLL. Returns a new bitmap containing the image from a region of the original.
Return type: bool. Calls the
DIBSetPixelsUnalignedentry of
DIBUTILS.DLL. Stuffs bytes from pixels into the bitmap. There are no alignment constraints on pixels (the usual way of doing this is to use theSetDIBitsfunction which requires that every scan line of the bitmap is 32-bit word aligned, even if the scan lines are not a multiple of 4 bytes long). doing this