QGIS API Documentation  3.24.2-Tisler (13c1a02865)
Classes | Static Public Member Functions | List of all members
QgsExifTools Class Reference

Contains utilities for working with EXIF tags in images. More...

#include <qgsexiftools.h>

Classes

class  GeoTagDetails
 Extended image geotag details. More...
 

Static Public Member Functions

static bool geoTagImage (const QString &imagePath, const QgsPointXY &location, const GeoTagDetails &details=QgsExifTools::GeoTagDetails())
 Writes geotags to the image at imagePath. More...
 
static QgsPoint getGeoTag (const QString &imagePath, bool &ok)
 Returns the geotagged coordinate stored in the image at imagePath. More...
 
static Q_INVOKABLE bool hasGeoTag (const QString &imagePath)
 Returns true if the image at imagePath contains a valid geotag. More...
 
static QVariant readTag (const QString &imagePath, const QString &key)
 Returns the value of of an exif tag key stored in the image at imagePath. More...
 
static QVariantMap readTags (const QString &imagePath)
 Returns a map object containing all exif tags stored in the image at imagePath. More...
 

Detailed Description

Contains utilities for working with EXIF tags in images.

Since
QGIS 3.6

Definition at line 32 of file qgsexiftools.h.

Member Function Documentation

◆ geoTagImage()

bool QgsExifTools::geoTagImage ( const QString &  imagePath,
const QgsPointXY location,
const GeoTagDetails details = QgsExifTools::GeoTagDetails() 
)
static

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

Definition at line 307 of file qgsexiftools.cpp.

◆ getGeoTag()

QgsPoint QgsExifTools::getGeoTag ( const QString &  imagePath,
bool &  ok 
)
static

Returns the geotagged coordinate stored in the image at imagePath.

If a geotag was found, ok will be set to true.

If the image contains an elevation tag then the returned point will contain the elevation as a z value.

See also
geoTagImage()

Definition at line 239 of file qgsexiftools.cpp.

◆ hasGeoTag()

bool QgsExifTools::hasGeoTag ( const QString &  imagePath)
static

Returns true if the image at imagePath contains a valid geotag.

See also
getGeoTag()

Definition at line 232 of file qgsexiftools.cpp.

◆ readTag()

QVariant QgsExifTools::readTag ( const QString &  imagePath,
const QString &  key 
)
static

Returns the value of of an exif tag key stored in the image at imagePath.

Since
QGIS 3.22

Definition at line 172 of file qgsexiftools.cpp.

◆ readTags()

QVariantMap QgsExifTools::readTags ( const QString &  imagePath)
static

Returns a map object containing all exif tags stored in the image at imagePath.

Since
QGIS 3.22

Definition at line 199 of file qgsexiftools.cpp.


The documentation for this class was generated from the following files: