PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Image displayed in an Image control
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
ImageInfoSave (Function)
In French: ImageInfoSauve
Saves the modifications made to the Exif tags of an image by ImageInfoModify.
Notes:
  • The Exif (EXchangeable Image File) information is included in the image file. This standard defines a set of tags used to store information about the image: date, width, orientation, camera model, shutter speed, distance, exposure time, ...
  • dSaveImageJPEG can also be used to save the modifications performed on the Exif tags of an image displayed in an Image control.
Example
ImgPath is string = "C:\Travel\Mauritius1.JPG"
// Modify the copyright and the description
ImageInfoModify(ImgPath, imgCopyright, "PC Soft" + DateSys())
ImageInfoModify(ImgPath, imgDescription, "Breathtaking landscape")
// Save the modification in the
// the same image file
ImageInfoSave(ImgPath)
// Close the image file
ImageInfoClose(ImgPath)
// Modify the comments of the image
// displayed in the "IMG_MyImageControl" control
ImageInfoModify(IMG_MyImageControl, imgComment, "Coral Reef")
// Save the modification in the
// "C:\Diving\Coral.JPG" file
ImageInfoSave(MyImageControl, "C:\Diving\Coral.JPG", 100)
Syntax
<Result> = ImageInfoSave(<Image> [, <New Image> [, <Quality>]])
<Result>: Boolean
  • True if the modifications were saved,
  • False otherwise. To find out the error details, use ErrorInfo.
<Image>: Character string (with or without quotes)
Image to use. This image can correspond to:
  • an image file (JPEG format): specify the name and the full (or relative) path of the file. A UNC path can be used.
    In this case, the file must be closed by ImageInfoClose.
  • an image displayed in an Image control: specify the name of the Image control. If this image is not in JPEG format, it will be automatically converted to this format.
  • an image (JPEG format) found in an image memo: specify this image memo.
  • an image (JPEG format) found in a binary string: specify this binary string.
<New Image>: Optional character string (with quotes)
Name and full (or relative) path of the new JPEG file. A UNC path can be used.
If <Image> corresponds to an image file, this parameter is optional. In this case, the <Image> file will be modified.
If <Image> corresponds to an image displayed in an Image control, only the visible section of the image displayed in the Image control will be saved. The Exif tags will be kept.
<Quality>: Optional integer
Quality of the image saved. Value included between 1 and 100 (80 by default). The lower the image quality will be, the higher the compression rate of the image will be and the smaller the size of the file will be.
This parameter is taken into account only if <Image> corresponds to an image displayed in an Image control. Otherwise, this parameter is ignored.
Remarks

Image displayed in an Image control

dSaveImageJPEG can also be used to save the modifications performed on the Exif tags of an image displayed in an Image control.
The following syntaxes are equivalent:
// Save the modifications
ImageInfoSave(MyImageControl, "C:\My Images\Mauritius.JPG", 100)
// Save the modifications
dSaveImageJPEG(MyImageControl, "C:\My Images\Mauritius.JPG", 100, imgSaveTag)
Reminder: Only the visible section of the image displayed in the Image control is saved. The Exif tags will be kept.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230img.dll
See also
Minimum required version
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment