ExifInfo QML Type

The ExifInfo component provides functionality for reading and writing Exchangeable Image File (EXIF) metadata. More...

Import Statement: import ArcGIS.AppFramework 1.0
Inherits:

FileInfo

Properties

Signals

Methods

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

NameValue
ExifInfo.ImageWidth256
ExifInfo.ImageLength257
ExifInfo.ImageBitsPerSample258
ExifInfo.ImageCompression259
ExifInfo.ImagePhotometricInterpretation262
ExifInfo.ImageDescription270
ExifInfo.ImageMake271
ExifInfo.ImageModel272
ExifInfo.ImageStripOffsets273
ExifInfo.ImageOrientation274
ExifInfo.ImageSamplesPerPixel277
ExifInfo.ImageRowsPerStrip278
ExifInfo.ImageStripByteCounts279
ExifInfo.ImageXResolution282
ExifInfo.ImageYResolution283
ExifInfo.ImagePlanarConfiguration284
ExifInfo.ImageResolutionUnit296
ExifInfo.ImageTransferFunction301
ExifInfo.ImageSoftware305
ExifInfo.ImageDateTime306
ExifInfo.ImageArtist315
ExifInfo.ImageWhitePoint318
ExifInfo.ImagePrimaryChromaticities319
ExifInfo.ImageYCbCrCoefficients529
ExifInfo.ImageYCbCrSubSampling530
ExifInfo.ImageYCbCrPosition531
ExifInfo.ImageReferenceBlackWhite532
ExifInfo.ImageRating18246
ExifInfo.ImageRatingPercent18249
ExifInfo.ImageCopyright33432
ExifInfo.ImageXPTitle40091
ExifInfo.ImageXPComment40092
ExifInfo.ImageXPAuthor40093
ExifInfo.ImageXPKeywords40094
ExifInfo.ImageXPSubject40095
ExifInfo.ImageLensSpecification42034
ExifInfo.ImageLensModel42035
ExifInfo.ImageLensMake42035
ExifInfo.ImageLensSerialNumber42036

ExtendedTag enumeration

NameValue
ExifInfo.ExtendedSubjectDistanceRange1036
ExifInfo.ExtendedExposureTime33434
ExifInfo.ExtendedFNumber33437
ExifInfo.ExtendedExposureProgram34850
ExifInfo.ExtendedSpectralSensitivity34852
ExifInfo.ExtendedISOSpeedRatings34855
ExifInfo.ExtendedOecf34856
ExifInfo.ExtendedExifVersion36864
ExifInfo.ExtendedDateTimeOriginal36867
ExifInfo.ExtendedDateTimeDigitized36868
ExifInfo.ExtendedComponentsConfiguration37121
ExifInfo.ExtendedCompressedBitsPerPixel37122
ExifInfo.ExtendedShutterSpeedValue37377
ExifInfo.ExtendedApertureValue37378
ExifInfo.ExtendedBrightnessValue37379
ExifInfo.ExtendedExposureBiasValue37380
ExifInfo.ExtendedMaxApertureValue37381
ExifInfo.ExtendedSubjectDistance37382
ExifInfo.ExtendedMeteringMode37383
ExifInfo.ExtendedLightSource37384
ExifInfo.ExtendedFlash37385
ExifInfo.ExtendedFocalLength37386
ExifInfo.ExtendedSubjectArea37396
ExifInfo.ExtendedMakerNote37500
ExifInfo.ExtendedUserComment37510
ExifInfo.ExtendedSubSecTime37520
ExifInfo.ExtendedSubSecTimeOriginal37521
ExifInfo.ExtendedSubSecTimeDigitized37522
ExifInfo.ExtendedFlashPixVersion40960
ExifInfo.ExtendedColorSpace40961
ExifInfo.ExtendedPixelXDimension40962
ExifInfo.ExtendedPixelYDimension40963
ExifInfo.ExtendedRelatedSoundFile40964
ExifInfo.ExtendedFlashEnergy41483
ExifInfo.ExtendedSpatialFrequencyResponse41484
ExifInfo.ExtendedFocalPlaneXResolution41486
ExifInfo.ExtendedFocalPlaneYResolution41487
ExifInfo.ExtendedFocalPlaneResolutionUnit41488
ExifInfo.ExtendedSubjectLocation41492
ExifInfo.ExtendedExposureIndex41493
ExifInfo.ExtendedSensingMethod41495
ExifInfo.ExtendedFileSource41728
ExifInfo.ExtendedSceneType41729
ExifInfo.ExtendedCfaPattern41730
ExifInfo.ExtendedCustomRendered41985
ExifInfo.ExtendedExposureMode41986
ExifInfo.ExtendedWhiteBalance41987
ExifInfo.ExtendedDigitalZoomRatio41988
ExifInfo.ExtendedFocalLengthIn35mmFilm41989
ExifInfo.ExtendedSceneCaptureType41990
ExifInfo.ExtendedGainControl41991
ExifInfo.ExtendedContrast41992
ExifInfo.ExtendedSaturation41993
ExifInfo.ExtendedSharpness41994
ExifInfo.ExtendedDeviceSettingDescription41995
ExifInfo.ExtendedImageUniqueId42016

GpsTag enumeration

NameValue
ExifInfo.GpsVersionId0
ExifInfo.GPSVersionID0
ExifInfo.GpsLatitudeRef1
ExifInfo.GPSLatitudeRef1
ExifInfo.GpsLatitude2
ExifInfo.GPSLatitude2
ExifInfo.GpsLongitudeRef3
ExifInfo.GPSLongitudeRef3
ExifInfo.GpsLongitude4
ExifInfo.GPSLongitude4
ExifInfo.GPSAltitudeRef5
ExifInfo.GpsAltitudeRef5
ExifInfo.GpsAltitude6
ExifInfo.GPSAltitude6
ExifInfo.GpsTimeStamp7
ExifInfo.GPSTimeStamp7
ExifInfo.GpsSatellites8
ExifInfo.GPSSatellites8
ExifInfo.GPSStatus9
ExifInfo.GpsStatus9
ExifInfo.GpsMeasureMode10
ExifInfo.GPSMeasureMode10
ExifInfo.GpsDop11
ExifInfo.GPSDOP11
ExifInfo.GPSSpeedRef12
ExifInfo.GpsSpeedRef12
ExifInfo.GpsSpeed13
ExifInfo.GPSSpeed13
ExifInfo.GPSTrackRef14
ExifInfo.GpsTrackRef14
ExifInfo.GpsTrack15
ExifInfo.GPSTrack15
ExifInfo.GpsImageDirectionRef16
ExifInfo.GPSImgDirectionRef16
ExifInfo.GpsImageDirection17
ExifInfo.GPSImgDirection17
ExifInfo.GpsMapDatum18
ExifInfo.GPSMapDatum18
ExifInfo.GPSDestLatitudeRef19
ExifInfo.GpsDestLatitudeRef19
ExifInfo.GPSDestLatitude20
ExifInfo.GpsDestLatitude20
ExifInfo.GpsDestLongitudeRef21
ExifInfo.GPSDestLongitudeRef21
ExifInfo.GPSDestLongitude22
ExifInfo.GpsDestLongitude22
ExifInfo.GPSDestBearingRef23
ExifInfo.GpsDestBearingRef23
ExifInfo.GpsDestBearing24
ExifInfo.GPSDestBearing24
ExifInfo.GPSDestDistanceRef25
ExifInfo.GpsDestDistanceRef25
ExifInfo.GPSDestDistance26
ExifInfo.GpsDestDistance26
ExifInfo.GpsProcessingMethod27
ExifInfo.GPSProcessingMethod27
ExifInfo.GpsAreaInformation28
ExifInfo.GPSAreaInformation28
ExifInfo.GPSDateStamp29
ExifInfo.GpsDateStamp29
ExifInfo.GpsDifferential30
ExifInfo.GPSDifferential30
ExifInfo.GpsHorizontalPositionError31
ExifInfo.GPSHPositioningError31

Property Documentation

[read-only] extendedTags : QList<int>

Returns a list of all extended tags in the image.

Examples of extended tags include ExifVersion, ExposureTime, SceneType and Contrast.


gpsAltitude : double

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.


gpsLatitude : double

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.


gpsLongitude : double

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.


[read-only] gpsTags : QList<int>

Returns a list of all GPS tags in the image.

Examples of GPS tags include GpsLatitude, GpsLongitude, GpsMapDatum and GpsDateStamp.


[read-only] imageTags : QList<int>

Returns a list of all image tags in the image.

Examples of image tags include ImageWidth, XResolution, Orientation and DateTime.


[read-only] isExifValid : bool

Returns true if the EXIF image is valid. Returns false if it is not.


values : object


Signal Documentation

exifChanged()

Signal emitted after an EXIF property changes.

Note: The corresponding handler is onExifChanged.


Method Documentation

clear()

Clears all information in the EXIF.


string extendedTagName(extendedtag extendedTag)

Returns the nanme of the extended tag.

The extendedTag parameter

The name of the extended tag, i.e. ExtendedPixelYDimension.


object extendedValue(extendedtag extendedTag)

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().


string gpsTagName(gpstag gpsTag)

Returns the name of the GPS tag.

The gpsTag parameter

The name of the GPS tag, i.e. GpsLatitude.


object gpsValue(gpstag gpsTag)

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().


string imageTagName(imagetag imageTag)

Returns the name of the image tag.

The imageTag parameter

The name of the image tag, i.e. ImageWidth.


object imageValue(imagetag imageTag)

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().


bool load(url fileUrl)

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.


bool load(string filePath)

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.


removeExtendedValue(extendedtag extendedTag)

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


removeGpsValue(gpstag gpsTag)

Removes the value of the GPS tag.

The gpsTag parameter

The name of the GPS tag you're removing, i.e. GpsLatitude.


removeImageValue(imagetag imageTag)

Removes the value of the image tag.

The imageTag parameter

The name of the image tag you're removing, i.e. ImageWidth.


bool save(url fileUrl)

Saves the photo, with altered EXIF tags, to the designated url.

The fileUrl parameter

The url to save the photo to.


bool save(string filePath)

Saves the photo, with altered EXIF tags, to the defined filepath.

The filePath parameter

The file path to save the image to.


setExtendedValue(extendedtag extendedTag, object value)

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().


setGpsValue(gpstag gpsTag, object value)

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().


setImageValue(imagetag imageTag, object value)

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().


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.