#define GDIPLUS_PIXELFORMAT_1bppIndexed 0x00030101 #define GDIPLUS_PIXELFORMAT_4bppIndexed 0x00030402 #define GDIPLUS_PIXELFORMAT_8bppIndexed 0x00030803 #define GDIPLUS_PIXELFORMAT_16bppGrayScale 0x00101004 #define GDIPLUS_PIXELFORMAT_16bppRGB555 0x00021005 #define GDIPLUS_PIXELFORMAT_16bppRGB565 0x00021006 #define GDIPLUS_PIXELFORMAT_16bppARGB1555 0x00061007 #define GDIPLUS_PIXELFORMAT_24bppRGB 0x00021808 #define GDIPLUS_PIXELFORMAT_32bppRGB 0x00022009 #define GDIPLUS_PIXELFORMAT_32bppARGB 0x0026200A #define GDIPLUS_PIXELFORMAT_32bppPARGB 0x000E200B #define GDIPLUS_PIXELFORMAT_48bppRGB 0x0010300C #define GDIPLUS_PIXELFORMAT_64bppPARGB 0x001C400E lcSource = GETPICT() lcDestination = "c:\test.bmp" SET PATH TO HOME(1) LOCAL loImage AS GpImage of ffc/_gdiplus.vcx loImage = NEWOBJECT("GpImage", "FFC\_gdiplus.vcx") loImage.CreateFromFile(lcSource) LOCAL loBitmap AS GpBitmap of ffc/_gdiplus.vcx loBitmap = NEWOBJECT("GpBitmap", "ffc/_gdiplus.vcx") LOCAL loGraphics as GpGraphics of ffc/_gdiplus.vcx loGraphics = NEWOBJECT('GpGraphics','ffc/_gdiplus.vcx') *** Now we create a new image with *** Create Method - Creates a bitmap object. *** Syntax: ? THIS.Create(tnWidth, tnHeight[, tnPixelFormat]) *** ***tnPixelFormat, optional, one of GDIPLUS_PIXELFORMAT_* constants, *** defaults to GDIPLUS_PIXELFORMAT_32bppARGB. loBitmap.Create(324,198,GDIPLUS_PIXELFORMAT_16bppRGB565) && The size you specified *** The other constants are in the beginning of this code loGraphics.CreateFromImage(loBitmap) loGraphics.DrawImageScaled(loImage, 0, 0, 324, 198) loBitmap.SaveToFile(lcDestination, "image/bmp")