Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Correspondence between tags and constants
  • Managing errors
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
ImageInfoModify (Function)
In french: ImageInfoModifie
Modifies the value of an Exif tag for the image used.
This modification is performed in memory. To save this modification, use ImageInfoSave or dSaveImageJPEG.
  • 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, ...
  • If the specified Exif tag does not exist for the image used, this tag is added to the image.
  • Some specific tags (the "Offsets" for instance) cannot be modified. In this case, the modification is ignored (<Result> = False).
  • To handle the Exif tags of an image, it is also possible to use the Property Exif variables of type Image. This Property can be used for Android applications.
CheminImg is string = "C:\Mes Images\MonImage.JPG"
// Modification du copyright
// Ce marqueur existe. Le type actuel de ce marqueur sera utilisé  
ImageInfoModify(CheminImg, imgCopyright, "PC Soft " + Today())
// Enregistrement de la modification
// Fermeture du fichier image
// Modification des commentaires de l'image JPEG
// affichée dans le champ Image "IMG_MonChampImage"
// Le marqueur "imgCommentaire" n'existe pas, il sera rajouté.
// Le type "ExifChaîne" sera automatiquement déduit
// à partir de la chaîne contenant les commentaires
ImageInfoModify(IMG_MonChampImage, imgComment, "Belles gorgones")
// Enregistrement de la modification
ImageInfoSave(IMG_MonChampImage, "C:\Plongees\Gorgone1.JPG")
CheminImg is string = "C:\Mes Images\Chien1.JPG"
// Modification de la focale
// Si ce marqueur n'existe pas, la valeur de la focale
// sera enregistrée sous forme de rationnel signé
// Si ce marqueur existe, le type actuel de ce
// marqueur sera utilisé
ImageInfoModify(CheminImg, imgFAperture, 2.8, ExifRational)
// Enregistrement de la modification
// Fermeture du fichier image
<Result> = ImageInfoModify(<Image> , <Tag> , <New value> [, <Type of Tag>])
<Result>: Boolean
  • True if the modification was performed,
  • False otherwise.
<Image>: Character string
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, this image will be automatically converted to this format during its backup (ImageInfoSave or dSaveImageJPEG).
  • 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.
<Tag>: Constant or integer
Tag whose value must be modified. This tag can correspond to:
  • an integer given by ImageInfoList.
  • a WLanguage constant. See "Correspondence between tags and constants" for more details.
<New value>: Type of the value of the tag to modify
New value for the specified tag.
<Type of Tag>: Optional integer constant
Type in which the value of the tag will be saved:
ExifBinaryBinary string
ExifStringASCII character string
ExifInteger4Signed 4-byte integer
ExifUInteger1Unsigned 1-byte integer
ExifUInteger2Unsigned 2-byte integer
ExifUInteger4Unsigned 4-byte integer
ExifRationalSigned rational
ExifURationalUnsigned rational
If the modified tag already exists for the image used, this parameter will be ignored and the current type of the modified tag will be used.
If the modified tag does not exist for the image used, we advise you to specify the tag type. Otherwise, the default type will be automatically deduced from <New Value>.

Correspondence between tags and constants

The table below presents the correspondence between tags and WLanguage constants.
TagWLanguage constant Value
37510imgCommentCharacter string
Comments about the image
Compression of the image in bits/pixel
33432imgCopyrightCharacter string
Image Copyright
Date and time of the image in YYYY:MM:DD HH:MM:SS format
270imgDescriptionCharacter string
Image description
Distance from the subject in meters
Exposure bias in APEX
Status of the flash during the shot:
  • 0: Flash off.
  • 1: Flash on.
  • 5: Flash on and light not detected.
  • 7: Flash on and light detected.
Height of image in pixels
Width of image in pixels
305imgRecordingSoftwareCharacter string
Name of the software that was used to record the image.
Focal length in millimeters.
Brightness of the image in APEX.
271imgDeviceMarkCharacter string
Mark of the camera that took the photo.
272imgDeviceModelCharacter string
Model of camera that took the photo.
Metering mode:
  • 0: unknown.
  • 1: average.
  • 2: average centered.
  • 3: point.
  • 4: multipoint.
  • 5: pattern.
  • 6: partial.
  • 7 to 254: reserved.
  • 255: other.
37500imgManufacturerNoteCharacter string
Name of the camera manufacturer
Orientation of the image:
  • 1 to 4: landscape.
  • 5 to 8: portrait.
Aperture in APEX.
Maximum aperture in APEX
Exposure mode used during the shot:
  • 0: undefined.
  • 1: manual.
  • 2: normal.
  • 3: priority to aperture.
  • 4: priority to speed.
  • 5: creation.
  • 6: action.
  • 7: close-up portrait without background.
  • 8: landscape.
  • 9 to 255: others.
Horizontal resolution of the image
Vertical resolution of the image
Light source for the image:
  • 0: unknown.
  • 1: daylight.
  • 2: fluorescent.
  • 3: tungsten.
  • 17: standard light A.
  • 18: standard light B.
  • 19: standard light C.
  • 20: D55.
  • 21: D65.
  • 22: D75.
  • 23 to 254: reserved.
  • 255: other.
Exposure time
Unit for the horizontal and vertical resolution of the image:
  • 2: inches.
  • 3: centimeters.
36864imgEXIFVersionCharacter string
Version of Exif information
65536imgThumbnailBinary string
Thumbnail corresponding to the image
Shutter speed in APEX
Other tags are also available. These unlisted tags are specific to some types of cameras or correspond to custom tags.

Managing errors

ImageInfoModify returns no error code. To determine if this function generated an error, use the ErrorOccurred variable. If an error occurs, you can get the details of the error with ErrorInfo.
Component: wd270img.dll
See also
Minimum version required
  • Version 10
This page is also available for…
Click [Add] to post a comment