Skip to content

write_image_metadataWriteImageMetadataWriteImageMetadatawrite_image_metadatawrite_image_metadata🔗

Short description🔗

write_image_metadataWriteImageMetadataWriteImageMetadatawrite_image_metadatawrite_image_metadata — Write metadata of image files.

Signature🔗

write_image_metadata( string Format, tuple TagName, tuple TagValue, filename.write FileName )void WriteImageMetadata( const HTuple& Format, const HTuple& TagName, const HTuple& TagValue, const HTuple& FileName )static void HOperatorSet.WriteImageMetadata( HTuple format, HTuple tagName, HTuple tagValue, HTuple fileName )def write_image_metadata( format: str, tag_name: str, tag_value: Union[int, float, str], file_name: str ) -> None

Herror write_image_metadata( const char* Format, const char* TagName, const char* TagValue, const char* FileName )

Herror T_write_image_metadata( const Htuple Format, const Htuple TagName, const Htuple TagValue, const Htuple FileName )

static void HImage::WriteImageMetadata( const HString& Format, const HTuple& TagName, const HTuple& TagValue, const HString& FileName )

static void HImage::WriteImageMetadata( const char* Format, const HTuple& TagName, const HTuple& TagValue, const char* FileName )

static void HImage::WriteImageMetadata( const wchar_t* Format, const HTuple& TagName, const HTuple& TagValue, const wchar_t* FileName ) (Windows only)

static void HImage.WriteImageMetadata( string format, HTuple tagName, HTuple tagValue, string fileName )

Description🔗

The operator write_image_metadataWriteImageMetadata saves the information in TagValuetagValuetag_value with the tag TagNametagNametag_name into the file FileNamefileNamefile_name. In doing so, TagValuetagValuetag_value and TagNametagNametag_name can be single values or tuples of values. The parameter Formatformatformat specifies, in which format the metadata is to be written.

This operators supports for Formatformatformat the TIFF metadata formats 'tiff'"tiff" and 'bigtiff'"bigtiff". A file extension .tif is expected.

A list of the supported tag names for TagNametagNametag_name and the according data types for TagValuetagValuetag_value is given in read_image_metadataReadImageMetadata.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

Formatformatformat (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Graphic format.

Default: 'tiff'"tiff"
Suggested values: 'tiff', 'bigtiff'"tiff", "bigtiff"

TagNametagNametag_name (input_control) tuple → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of the tag to be written in the image file.

Default: 'tiff_image_description'"tiff_image_description"
Suggested values: 'tiff_image_description', 'tiff_make', 'tiff_software', 'tiff_date_time', 'tiff_copyright', 'tiff_exposure_time', 'tiff_aperture_value', 'tiff_light_source'"tiff_image_description", "tiff_make", "tiff_software", "tiff_date_time", "tiff_copyright", "tiff_exposure_time", "tiff_aperture_value", "tiff_light_source"

TagValuetagValuetag_value (input_control) tuple → (string / integer / real)HTuple (HString / Hlong / double)HTuple (string / int / long / double)Union[int, float, str]Htuple (char* / Hlong / double)

Value of the tag to be written in the image file.

FileNamefileNamefile_name (input_control) filename.write → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of image file.

File extension: .tif, .tiff

Result🔗

If TagValuetagValuetag_value can be correctly written for the specified parameters the operator write_image_metadataWriteImageMetadata returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised. In this case, an extended error information, as e.g., the causative tag, may be set and can be queried with the operator get_extended_error_infoGetExtendedErrorInfo.

Combinations with other operators🔗

Combinations

Possible predecessors

write_imageWriteImage

Possible successors

read_image_metadataReadImageMetadata

Module🔗

Foundation