Class: QgsExifTools¶
- class qgis.core.QgsExifTools¶
Bases:
sip.wrapper
Contains utilities for working with EXIF tags in images.
New in version 3.6:
Methods
Writes geotags to the image at
imagePath
.Returns the geotagged coordinate stored in the image at
imagePath
.Returns
True
if the image atimagePath
contains a valid geotag.Returns the value of of an exif tag
key
stored in the image atimagePath
.Returns a map object containing all exif tags stored in the image at
imagePath
.Attributes
- class GeoTagDetails¶
Bases:
sip.wrapper
Extended image geotag details.
New in version 3.6.
- elevation¶
- geoTagImage(imagePath: str, location: QgsPointXY, details: QgsExifTools.GeoTagDetails = QgsExifTools.GeoTagDetails()) bool ¶
Writes geotags to the image at
imagePath
.The
location
argument indicates the GPS location to write to the image, as a WGS84 latitude/longitude coordinate.If desired, extended GPS tags (such as elevation) can be specified via the
details
argument.Returns
True
if writing was successful.See also
- Parameters
imagePath (str) –
location (QgsPointXY) –
details (QgsExifTools.GeoTagDetails = QgsExifTools.GeoTagDetails()) –
- Return type
bool
- getGeoTag(imagePath: str) Tuple[QgsPoint, bool] ¶
Returns the geotagged coordinate stored in the image at
imagePath
.If a geotag was found,
ok
will be set toTrue
.If the image contains an elevation tag then the returned point will contain the elevation as a z value.
See also
- Parameters
imagePath (str) –
- Return type
Tuple[
QgsPoint
, bool]
- hasGeoTag(imagePath: str) bool ¶
Returns
True
if the image atimagePath
contains a valid geotag.See also
- Parameters
imagePath (str) –
- Return type
bool
- readTag(imagePath: str, key: str) Any ¶
Returns the value of of an exif tag
key
stored in the image atimagePath
.New in version 3.22.
- Parameters
imagePath (str) –
key (str) –
- Return type
Any
- readTags(imagePath: str) Dict[str, Any] ¶
Returns a map object containing all exif tags stored in the image at
imagePath
.New in version 3.22.
- Parameters
imagePath (str) –
- Return type
Dict[str, Any]
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶