Alexander Golovlev, Epam Systems
GDI+ Image class is a VFP class to load, save and transform BMP, JPEG, GIF, PNG and TIFF images. It provides also creating thumbnails, resizing, cropping and rotating, conversion to/from Picture object, copying to/from clipboard, capturing of screen or any window.
Créé le
Il y a 20 années
Téléchargements
6509
Type de fichier
Freeware
Résultat de votes
4.89/5.00
Method | Explanation |
---|
Create(tnWidth, tnHeight, tcPixelFormat) | Creates an empty image object |
Load(tcFileName) | Loads an image from file |
FromResource(tcFileName, tcBitmapName) | Loads an image from bitmap resource in EXE/DLL file. Resource can be identified by name: img.FromResource ("dxdiag.exe", "DIRECTX"), or by number: img.FromResource ("shell32.dll", "#309"). |
FromPicture(toPicture) | Creates an image object from Picture object |
GetPicture() | Returns Picture object |
FromClipboard() | Creates an image object from clipboard content |
ToClipboard() | Copies an image to clipboard |
Thumbnail(tnWidth, tnHeight) | Creates thumbnail of specified size |
SaveAsBMP(tcFileName) | Stores image in BMP file |
SaveAsJPEG(tcFileName, tnQuality, tnTransform) | Stores image in JPEG file. Optional parameter tnQuality specifies quality of JPEG compression, 0 - highest compression, 100 - highest quality, default value - 75. Optional parameter tnTransform specifies type of transformation without loss of information, any of EncoderValueTransform values. |
SaveAsGIF(tcFileName) | Stores image in GIF file |
SaveAsTIFF(tcFileName, tnCompress, tnColorDepth) | Stores image in TIFF file. Parameter tnCompress specifies type of compression, any of EncoderValueCompression values, optional. Parameter tnColorDepth specifies number of colors in bits per pixel (1,4,8,16,24,32,48,64), optional. |
SaveAsPNG(tcFileName) | Stores image in PNG file |
SaveAsMultipageTIFF(tcFileName, tnCompress, tnColorDepth) | Stores image as first page of multipage TIFF file |
SaveAddPage(tnImage) | Adds specified image as page of multipage file. Parameter tnImage is a value, returned by GetImage() function of another image object. |
GetImage() | Returns pointer to GDI+ image object which can be used in API functions and SaveAddPage() function. |
GetPixelColor(x, y) | Returns color value of pixel |
GetPixelAlpha(x, y) | Returns alpha value of pixel |
SetPixel(x, y, tnColor, tnAlpha) | Sets color and alpha values of pixel |
Crop(x, y, tnWidth, tnHeight) | Crops an image |
RotateFlip(rotateFlipType) | Rotates and flips an image |
Resize(tnWidth, tnHeight, tnInterpolationMode) | Resizes an image |
GetPageCount() | Returns number of pages in multipage (TIFF) file |
SelectPage(tnPage) | Selects the specified page in multipage (TIFF) file |
GetFrameCount() | Returns number of time frames in multiframe (GIF) file |
SelectFrame(tnFrame) | Selects the specified time frame in multiframe (GIF) file |
Capture(thWnd) | Captures the window, specified by handle or desktop, if handle is not specified |
Thank you very much Alexander for this powerfull tool. It ist very usefull and works perfecty. I have saved a lot of time while using it instead of a self coded solution.
Alexander, anyone who works with images and VFP needs to look at this class! Works Great!
Really good! But EXIF information is missing when converting jpg file with RESIZE(..) and then SaveAsJPEG(..)
Now I can automate what I was doing manually for months! And I got it to work in just a few minutes. Really great!