ImageMetadataReader Class

Summary: Class for editing, adding some EXIF tags

Module: aspose.gis.imagemetadata

Full Name: aspose.gis.imagemetadata.ImageMetadataReader

Aspose.PSD Version: 25.9.0

Methods

NameDescription
get_reader(file_name)Creates a reader instance for EXIF tags
get_reader(stream)Creates a reader instance for EXIF tags
read_data()Extracts all supported EXIF tags
save(file_name)Save to new file since the original one is locked for changes
save(file_name, format)Save to new file since the original one is locked for changes
save(stream)Saving changes to a separate stream
save(stream, format)Saving changes to a separate stream
set_artist(artist)Saving the EXIF Artist tag, adding or overwriting the data.
set_description(description)Saving the EXIF ImageDescription tag, adding or overwriting the data.
set_geo_location(latitude, longitude)Saving the EXIF GPSLatitudeRef, GPSLongitudeRef, GPSLatitude and GPSLongitude tags, adding or overwriting the data.
set_image_size(width, height)Saving the EXIF ImageWidth and ImageHeight tags, adding or overwriting the data.
set_modify_date(modify_date)Saving the EXIF ModifyDate (DataTime) tag, adding or overwriting the data.
try_get_artist(artist)It tries to find EXIF tag Artist, if the tag is not found it returns null
try_get_description(description)It tries to find EXIF tag ImageDescription, if the tag is not found it returns null
try_get_geo_location(geo_location)It tries to find EXIF set of tags GPSLatitudeRef, GPSLongitudeRef, GPSLatitude, GPSLongitude, if the tags does not presented it returns null
try_get_image_size(image_size)It tries to find EXIF set of tags ImageWidth and ImageHeight, if the tags does not presented it returns null
try_get_modify_date(modify_date)It tries to find EXIF tag ModifyDate (DataTime), if the tag is not found it returns default DataTime value

Method: get_reader(file_name) [static]

 get_reader(file_name) 

Creates a reader instance for EXIF tags

Parameters:

ParameterTypeDescription
file_namestringFull name of the image file.

Returns

TypeDescription
ImageMetadataReaderMetadata reader instance

Method: get_reader(stream) [static]

 get_reader(stream) 

Creates a reader instance for EXIF tags

Parameters:

ParameterTypeDescription
stream_io.BufferedRandomImage data source stream

Returns

TypeDescription
ImageMetadataReaderMetadata reader instance

Method: read_data()

 read_data() 

Extracts all supported EXIF tags

Returns

TypeDescription
ImageDataImageData that represented set of supported tags

Method: save(file_name)

 save(file_name) 

Save to new file since the original one is locked for changes

Parameters:

ParameterTypeDescription
file_namestringFull name of the destination file

Method: save(file_name, format)

 save(file_name, format) 

Save to new file since the original one is locked for changes

Parameters:

ParameterTypeDescription
file_namestringFull name of the destination file
formatImageFormatSpecifies the format for saving

Method: save(stream)

 save(stream) 

Saving changes to a separate stream

Parameters:

ParameterTypeDescription
stream_io.BufferedRandomDestination stream

Method: save(stream, format)

 save(stream, format) 

Saving changes to a separate stream

Parameters:

ParameterTypeDescription
stream_io.BufferedRandomDestination stream
formatImageFormatSpecifies the format for saving

Method: set_artist(artist)

 set_artist(artist) 

Saving the EXIF Artist tag, adding or overwriting the data.

Parameters:

ParameterTypeDescription
artiststringThe artist.

Method: set_description(description)

 set_description(description) 

Saving the EXIF ImageDescription tag, adding or overwriting the data.

Parameters:

ParameterTypeDescription
descriptionstringThe description.

Method: set_geo_location(latitude, longitude)

 set_geo_location(latitude, longitude) 

Saving the EXIF GPSLatitudeRef, GPSLongitudeRef, GPSLatitude and GPSLongitude tags, adding or overwriting the data.

Parameters:

ParameterTypeDescription
latitudedoubleThe latitude.
longitudedoubleThe longitude.

Method: set_image_size(width, height)

 set_image_size(width, height) 

Saving the EXIF ImageWidth and ImageHeight tags, adding or overwriting the data.

Parameters:

ParameterTypeDescription
widthintThe width.
heightintThe height.

Method: set_modify_date(modify_date)

 set_modify_date(modify_date) 

Saving the EXIF ModifyDate (DataTime) tag, adding or overwriting the data.

Parameters:

ParameterTypeDescription
modify_datedatetimeThe modify date.

Method: try_get_artist(artist)

 try_get_artist(artist) 

It tries to find EXIF tag Artist, if the tag is not found it returns null

Parameters:

ParameterTypeDescription
artistStringThe artist.

Returns

TypeDescription
boolTrue if successful

Method: try_get_description(description)

 try_get_description(description) 

It tries to find EXIF tag ImageDescription, if the tag is not found it returns null

Parameters:

ParameterTypeDescription
descriptionStringThe description.

Returns

TypeDescription
boolTrue if successful

Method: try_get_geo_location(geo_location)

 try_get_geo_location(geo_location) 

It tries to find EXIF set of tags GPSLatitudeRef, GPSLongitudeRef, GPSLatitude, GPSLongitude, if the tags does not presented it returns null

Parameters:

ParameterTypeDescription
geo_locationGeoLocation[]The geo location.

Returns

TypeDescription
boolTrue if successful

Method: try_get_image_size(image_size)

 try_get_image_size(image_size) 

It tries to find EXIF set of tags ImageWidth and ImageHeight, if the tags does not presented it returns null

Parameters:

ParameterTypeDescription
image_sizeImageSize[]Size of the image.

Returns

TypeDescription
boolTrue if successful

Method: try_get_modify_date(modify_date)

 try_get_modify_date(modify_date) 

It tries to find EXIF tag ModifyDate (DataTime), if the tag is not found it returns default DataTime value

Parameters:

ParameterTypeDescription
modify_datedatetime[]The modify date.

Returns

TypeDescription
boolTrue if successful