The ExifInfo component provides functionality for reading and writing Exchangeable Image File (EXIF) metadata. More...
Import Statement: | import ArcGIS.AppFramework 1.0 |
Inherits: |
Properties
- extendedTags : QList<int>
- gpsAltitude : double
- gpsLatitude : double
- gpsLongitude : double
- gpsTags : QList<int>
- imageTags : QList<int>
- isExifValid : bool
- values : object
Signals
Methods
- clear()
- string extendedTagName(extendedtag extendedTag)
- object extendedValue(extendedtag extendedTag)
- string gpsTagName(gpstag gpsTag)
- object gpsValue(gpstag gpsTag)
- string imageTagName(imagetag imageTag)
- object imageValue(imagetag imageTag)
- bool load(url fileUrl)
- bool load(string filePath)
- removeExtendedValue(extendedtag extendedTag)
- removeGpsValue(gpstag gpsTag)
- removeImageValue(imagetag imageTag)
- bool save(url fileUrl)
- bool save(string filePath)
- setExtendedValue(extendedtag extendedTag, object value)
- setGpsValue(gpstag gpsTag, object value)
- setImageValue(imagetag imageTag, object value)
Detailed Description
EXIF metadata includes image tags, extended tags and GPS tags that correspond to various image attributes. These are commonly-used, standard tags.
The following code snippet explains the usage of the ExifInfo component.
Item { property string filePath: AppFramework.standardPaths.defaultFolder(StandardPaths.PicturesLocation).filePath("sample.jpg") ColumnLayout { anchors.fill: parent TextArea { id: resultTextArea Layout.fillWidth: true Layout.fillHeight: true } Button { text: qsTr("Edit EXIF") onClicked: { exifInfo.setImageValue(ExifInfo.ImageCopyright, "my copyright"); exifInfo.setImageValue(ExifInfo.ImageDateTime, new Date()); exifInfo.setExtendedValue(ExifInfo.ExtendedFlash, 44); resultTextArea.text = JSON.stringify(exifInfo.values, undefined, 2); var ok = exifInfo.save(filePath); } } } ExifInfo { id: exifInfo } Component.onCompleted: { resultTextArea.text = ""; var ok = exifInfo.load(filePath); resultTextArea.text = JSON.stringify(exifInfo.values, undefined, 2); } }
Enumerations
ImageTag enumeration
Name | Value |
---|---|
ExifInfo.ImageWidth | 256 |
ExifInfo.ImageLength | 257 |
ExifInfo.ImageBitsPerSample | 258 |
ExifInfo.ImageCompression | 259 |
ExifInfo.ImagePhotometricInterpretation | 262 |
ExifInfo.ImageDescription | 270 |
ExifInfo.ImageMake | 271 |
ExifInfo.ImageModel | 272 |
ExifInfo.ImageStripOffsets | 273 |
ExifInfo.ImageOrientation | 274 |
ExifInfo.ImageSamplesPerPixel | 277 |
ExifInfo.ImageRowsPerStrip | 278 |
ExifInfo.ImageStripByteCounts | 279 |
ExifInfo.ImageXResolution | 282 |
ExifInfo.ImageYResolution | 283 |
ExifInfo.ImagePlanarConfiguration | 284 |
ExifInfo.ImageResolutionUnit | 296 |
ExifInfo.ImageTransferFunction | 301 |
ExifInfo.ImageSoftware | 305 |
ExifInfo.ImageDateTime | 306 |
ExifInfo.ImageArtist | 315 |
ExifInfo.ImageWhitePoint | 318 |
ExifInfo.ImagePrimaryChromaticities | 319 |
ExifInfo.ImageYCbCrCoefficients | 529 |
ExifInfo.ImageYCbCrSubSampling | 530 |
ExifInfo.ImageYCbCrPosition | 531 |
ExifInfo.ImageReferenceBlackWhite | 532 |
ExifInfo.ImageRating | 18246 |
ExifInfo.ImageRatingPercent | 18249 |
ExifInfo.ImageCopyright | 33432 |
ExifInfo.ImageXPTitle | 40091 |
ExifInfo.ImageXPComment | 40092 |
ExifInfo.ImageXPAuthor | 40093 |
ExifInfo.ImageXPKeywords | 40094 |
ExifInfo.ImageXPSubject | 40095 |
ExifInfo.ImageLensSpecification | 42034 |
ExifInfo.ImageLensModel | 42035 |
ExifInfo.ImageLensMake | 42035 |
ExifInfo.ImageLensSerialNumber | 42036 |
ExtendedTag enumeration
Name | Value |
---|---|
ExifInfo.ExtendedSubjectDistanceRange | 1036 |
ExifInfo.ExtendedExposureTime | 33434 |
ExifInfo.ExtendedFNumber | 33437 |
ExifInfo.ExtendedExposureProgram | 34850 |
ExifInfo.ExtendedSpectralSensitivity | 34852 |
ExifInfo.ExtendedISOSpeedRatings | 34855 |
ExifInfo.ExtendedOecf | 34856 |
ExifInfo.ExtendedExifVersion | 36864 |
ExifInfo.ExtendedDateTimeOriginal | 36867 |
ExifInfo.ExtendedDateTimeDigitized | 36868 |
ExifInfo.ExtendedComponentsConfiguration | 37121 |
ExifInfo.ExtendedCompressedBitsPerPixel | 37122 |
ExifInfo.ExtendedShutterSpeedValue | 37377 |
ExifInfo.ExtendedApertureValue | 37378 |
ExifInfo.ExtendedBrightnessValue | 37379 |
ExifInfo.ExtendedExposureBiasValue | 37380 |
ExifInfo.ExtendedMaxApertureValue | 37381 |
ExifInfo.ExtendedSubjectDistance | 37382 |
ExifInfo.ExtendedMeteringMode | 37383 |
ExifInfo.ExtendedLightSource | 37384 |
ExifInfo.ExtendedFlash | 37385 |
ExifInfo.ExtendedFocalLength | 37386 |
ExifInfo.ExtendedSubjectArea | 37396 |
ExifInfo.ExtendedMakerNote | 37500 |
ExifInfo.ExtendedUserComment | 37510 |
ExifInfo.ExtendedSubSecTime | 37520 |
ExifInfo.ExtendedSubSecTimeOriginal | 37521 |
ExifInfo.ExtendedSubSecTimeDigitized | 37522 |
ExifInfo.ExtendedFlashPixVersion | 40960 |
ExifInfo.ExtendedColorSpace | 40961 |
ExifInfo.ExtendedPixelXDimension | 40962 |
ExifInfo.ExtendedPixelYDimension | 40963 |
ExifInfo.ExtendedRelatedSoundFile | 40964 |
ExifInfo.ExtendedFlashEnergy | 41483 |
ExifInfo.ExtendedSpatialFrequencyResponse | 41484 |
ExifInfo.ExtendedFocalPlaneXResolution | 41486 |
ExifInfo.ExtendedFocalPlaneYResolution | 41487 |
ExifInfo.ExtendedFocalPlaneResolutionUnit | 41488 |
ExifInfo.ExtendedSubjectLocation | 41492 |
ExifInfo.ExtendedExposureIndex | 41493 |
ExifInfo.ExtendedSensingMethod | 41495 |
ExifInfo.ExtendedFileSource | 41728 |
ExifInfo.ExtendedSceneType | 41729 |
ExifInfo.ExtendedCfaPattern | 41730 |
ExifInfo.ExtendedCustomRendered | 41985 |
ExifInfo.ExtendedExposureMode | 41986 |
ExifInfo.ExtendedWhiteBalance | 41987 |
ExifInfo.ExtendedDigitalZoomRatio | 41988 |
ExifInfo.ExtendedFocalLengthIn35mmFilm | 41989 |
ExifInfo.ExtendedSceneCaptureType | 41990 |
ExifInfo.ExtendedGainControl | 41991 |
ExifInfo.ExtendedContrast | 41992 |
ExifInfo.ExtendedSaturation | 41993 |
ExifInfo.ExtendedSharpness | 41994 |
ExifInfo.ExtendedDeviceSettingDescription | 41995 |
ExifInfo.ExtendedImageUniqueId | 42016 |
GpsTag enumeration
Name | Value |
---|---|
ExifInfo.GpsVersionId | 0 |
ExifInfo.GPSVersionID | 0 |
ExifInfo.GpsLatitudeRef | 1 |
ExifInfo.GPSLatitudeRef | 1 |
ExifInfo.GpsLatitude | 2 |
ExifInfo.GPSLatitude | 2 |
ExifInfo.GpsLongitudeRef | 3 |
ExifInfo.GPSLongitudeRef | 3 |
ExifInfo.GpsLongitude | 4 |
ExifInfo.GPSLongitude | 4 |
ExifInfo.GPSAltitudeRef | 5 |
ExifInfo.GpsAltitudeRef | 5 |
ExifInfo.GpsAltitude | 6 |
ExifInfo.GPSAltitude | 6 |
ExifInfo.GpsTimeStamp | 7 |
ExifInfo.GPSTimeStamp | 7 |
ExifInfo.GpsSatellites | 8 |
ExifInfo.GPSSatellites | 8 |
ExifInfo.GPSStatus | 9 |
ExifInfo.GpsStatus | 9 |
ExifInfo.GpsMeasureMode | 10 |
ExifInfo.GPSMeasureMode | 10 |
ExifInfo.GpsDop | 11 |
ExifInfo.GPSDOP | 11 |
ExifInfo.GPSSpeedRef | 12 |
ExifInfo.GpsSpeedRef | 12 |
ExifInfo.GpsSpeed | 13 |
ExifInfo.GPSSpeed | 13 |
ExifInfo.GPSTrackRef | 14 |
ExifInfo.GpsTrackRef | 14 |
ExifInfo.GpsTrack | 15 |
ExifInfo.GPSTrack | 15 |
ExifInfo.GpsImageDirectionRef | 16 |
ExifInfo.GPSImgDirectionRef | 16 |
ExifInfo.GpsImageDirection | 17 |
ExifInfo.GPSImgDirection | 17 |
ExifInfo.GpsMapDatum | 18 |
ExifInfo.GPSMapDatum | 18 |
ExifInfo.GPSDestLatitudeRef | 19 |
ExifInfo.GpsDestLatitudeRef | 19 |
ExifInfo.GPSDestLatitude | 20 |
ExifInfo.GpsDestLatitude | 20 |
ExifInfo.GpsDestLongitudeRef | 21 |
ExifInfo.GPSDestLongitudeRef | 21 |
ExifInfo.GPSDestLongitude | 22 |
ExifInfo.GpsDestLongitude | 22 |
ExifInfo.GPSDestBearingRef | 23 |
ExifInfo.GpsDestBearingRef | 23 |
ExifInfo.GpsDestBearing | 24 |
ExifInfo.GPSDestBearing | 24 |
ExifInfo.GPSDestDistanceRef | 25 |
ExifInfo.GpsDestDistanceRef | 25 |
ExifInfo.GPSDestDistance | 26 |
ExifInfo.GpsDestDistance | 26 |
ExifInfo.GpsProcessingMethod | 27 |
ExifInfo.GPSProcessingMethod | 27 |
ExifInfo.GpsAreaInformation | 28 |
ExifInfo.GPSAreaInformation | 28 |
ExifInfo.GPSDateStamp | 29 |
ExifInfo.GpsDateStamp | 29 |
ExifInfo.GpsDifferential | 30 |
ExifInfo.GPSDifferential | 30 |
ExifInfo.GpsHorizontalPositionError | 31 |
ExifInfo.GPSHPositioningError | 31 |
Property Documentation
Returns a list of all extended tags in the image.
Examples of extended tags include ExifVersion, ExposureTime, SceneType and Contrast.
Returns the altitude of the image, as defined by the tag GpsAltitude.
This property is defined as NaN (Not a Number) if the image is not valid or does not contain the GpsTag GpsAltitude.
Returns the image's latitude in decimal degrees, as defined by the tag GpsLatitude.
This tag is returned as NaN (Not a Number) if the image is not valid or does not contain the GpsTag GpsLatitude. Southern latitude is returned as a negative value.
Returns the image's longitude in decimal degrees, as defined by the tag GpsLongitude.
This tag is returned as NaN (Not a Number) if the image is not valid or does not contain the GpsTag GpsLongitude. Western longitude is returned as a negative value.
Returns a list of all GPS tags in the image.
Examples of GPS tags include GpsLatitude, GpsLongitude, GpsMapDatum and GpsDateStamp.
Returns a list of all image tags in the image.
Examples of image tags include ImageWidth, XResolution, Orientation and DateTime.
Signal Documentation
Signal emitted after an EXIF property changes.
Note: The corresponding handler is onExifChanged
.
Method Documentation
Returns the nanme of the extended tag.
The extendedTag parameter
The name of the extended tag, i.e. ExtendedPixelYDimension.
Returns the value of the extended tag.
The extendedTag parameter
The name of the extended tag you're receiving the information from, i.e. ExtendedPixelYDimension.
See also setExtendedValue().
Returns the name of the GPS tag.
The gpsTag parameter
The name of the GPS tag, i.e. GpsLatitude.
Returns the value of the extended tag.
The gpsTag parameter
The name of the GPS tag you're receiving the value from, i.e. GpsLatitude.
See also setGpsValue().
Returns the name of the image tag.
The imageTag parameter
The name of the image tag, i.e. ImageWidth.
Returns the value of the given image tag.
The imageTag parameter
The name of the image tag you're receiving the value from, i.e. ImageWidth.
See also setImageValue().
Load EXIF info from the phot found at a given URL.
The fileUrl parameter
The URL of the image to load the EXIF info from.
Load EXIF info from the image found at a given filepath.
The filePath parameter
The filepath of the photo you're loading the EXIF info from.
Removes the value of the extended tag.
The extendedTag parameter
The name of the extended tag you're removing the value from, i.e. ExtendedPixelYDimension
Removes the value of the GPS tag.
The gpsTag parameter
The name of the GPS tag you're removing, i.e. GpsLatitude.
Removes the value of the image tag.
The imageTag parameter
The name of the image tag you're removing, i.e. ImageWidth.
Saves the photo, with altered EXIF tags, to the designated url.
The fileUrl parameter
The url to save the photo to.
Saves the photo, with altered EXIF tags, to the defined filepath.
The filePath parameter
The file path to save the image to.
Sets the value of the extended tag.
The extendedTag parameter
The name of the extended tag you're setting, i.e. ExtendedPixelYDimension.
The value parameter
The value you're setting the extended tag to. Validity of value will depend on the tag.
See also extendedValue().
Sets the value of the GPS tag.
The gpsTag parameter
The name of the GPS tag you're setting, i.e. gpsLatitude.
The value parameter
The value you're setting the GPS value to. Validity of value will depend on the tag.
See also gpsValue().
Sets the value of the image tag.
The imageTag parameter
The name of the image tag you're going to set, i.e. ImageWidth.
The value parameter
The value you're setting the tag to. Validity of value will depend on the tag.
See also imageValue().