Visual FoxPro class to access Gdi+, for earlier versions starting from VFP6

GpImage2 is a wrapper class that allows you to access all the main Gdi+ functions. Works great with all VFP versions, although it is not recommneded for VFP9 users, since we have available the GdiPlusX project, taht is a much complete project.

With GPIMAGE, drawing becomes super easy, and lots of other functionalities are available for VFP developers.

GDI+ Image class is a VFP class to load, save and transform BMP, JPEG, GIF, PNG and TIFF images. It provides also conversion to/from Picture object, copying to/retrieving from clipboard, capturing of screen or any window.


New Methods included let you draw rectangles, lines, ellipsis, pies, strings and pictures on images. Brings the possibility to control alignment, size, orientation, rotation, of any shape, text or picture.



This class is based on GDI+ and requires gdiplus.dll which is freely available and can be installed on Win98 and higher. If you have not installed WinXP or .NET runtime then you can download this DLL from
or directly:


You can find some good information about GdiPlus on Microsoft official site:


And also great explanations and examples about GDI+ at


gpImage.prg file contains three classes. gpInit class declares required API functions and initializes GDI+. The single instance of this class must be created before use of gpImage or graphics classes and must exist all the time when GDI+ is used. Properties and methods of gpImage and Graphics classes are described below.