Using Win32 functions in Visual FoxPro Image Gallery
GDI+ Image
..msdn
GdipDisposeImage
GdipGetImageFlags
GdipGetImageGraphicsContext
GdipGetImageHeight
GdipGetImageHorizontalResolution
GdipGetImagePalette
GdipGetImagePaletteSize
GdipGetImageRawFormat
GdipGetImageType
GdipGetImageVerticalResolution
GdipGetImageWidth
GdipGetPropertyCount
GdipGetPropertyIdList
GdipGetPropertyItem
GdipGetPropertyItemSize
GdipLoadImageFromFile
GdipRemovePropertyItem
GdipSaveImageToFile
GdipSetImagePalette
GdipSetPropertyItem
Code examples:
Custom GDI+ class
GdipSaveImageToFile
..msdn    Add comment     W32 Constants      Translate this page
Saves this image to a file.
Code examples:
Custom GDI+ class
Declaration:
GpStatus WINGDIPAPI GdipSaveImageToFile(
    GpImage *image,
    GDIPCONST WCHAR* filename,
    GDIPCONST CLSID* clsidEncoder,
    GDIPCONST EncoderParameters* encoderParams
)

FoxPro declaration:
DECLARE INTEGER GdipSaveImageToFile IN gdiplus;
    INTEGER img,;
    STRING  filename,;
    STRING  clsidEncoder,;
    INTEGER encoderParams

Parameters:
img
[in] Handle to Image Object

filename
[in] Pointer to a null-terminated string that specifies the path name for the saved image.

clsidEncoder
[in] Pointer to a CLSID that specifies the encoder to use to save the image.

encoderParams
[in] Optional. Pointer to an EncoderParameters object that holds parameters used by the encoder. The default value is NULL.
Return value:
Returns GpStatus value, 0 means success.
Usage:
#DEFINE ENCODER_JPEG  "{557CF401-1A04-11D3-9A73-0000F81EF32E}"

nResult = GdipSaveImageToFile(m.hImage,;
    STRCONV("image01.jpg"+CHR(0),5),;
    ENCODER_JPEG, 0)
My comment:
The technique of constructing a Graphics object based on an image works only for certain image formats. For example, you cannot construct a Graphics object based on an image that has a color depth of 4 bits per pixel.

GDI+ does not allow you to save an image to the same file that you used to construct the image.
Word Index links for the GdipSaveImageToFile :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2004-07-12 14:38:54
Modified: 2009-02-04 10:30:14
Visited in last 7 days: 20
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.145.95.149)
2 sec.Function: 'FillMemory'
4 sec.Function: 'GdipScaleTextureTransform'
6 sec.Function: 'CreateNamedPipe'
9 sec.Function: 'CloseHandle'
11 sec.Function: 'EnumDeviceDrivers'
13 sec.Function: 'CreateSymbolicLink'
16 sec.Function: 'FindCloseUrlCache'
19 sec.Solutions
21 sec.
Function group: 'GDI+ Font'
25 sec.Function: 'GetMenuString'
Google
Advertise here!