Operator Reference

write_image_metadatawrite_image_metadataWriteImageMetadataWriteImageMetadatawrite_image_metadata (Operator)

write_image_metadatawrite_image_metadataWriteImageMetadataWriteImageMetadatawrite_image_metadata — Write metadata of image files.

Signature

write_image_metadata( : : Format, TagName, TagValue, FileName : )

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)

void WriteImageMetadata(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 HOperatorSet.WriteImageMetadata(HTuple format, HTuple tagName, HTuple tagValue, HTuple fileName)

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

def write_image_metadata(format: str, tag_name: str, tag_value: Union[int, float, str], file_name: str) -> None

Description

The operator write_image_metadatawrite_image_metadataWriteImageMetadataWriteImageMetadatawrite_image_metadata saves the information in TagValueTagValueTagValuetagValuetag_value with the tag TagNameTagNameTagNametagNametag_name into the file FileNameFileNameFileNamefileNamefile_name. In doing so, TagValueTagValueTagValuetagValuetag_value and TagNameTagNameTagNametagNametag_name can be single values or tuples of values. The parameter FormatFormatFormatformatformat specifies, in which format the metadata is to be written.

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

A list of the supported tag names for TagNameTagNameTagNametagNametag_name and the according data types for TagValueTagValueTagValuetagValuetag_value is given in read_image_metadataread_image_metadataReadImageMetadataReadImageMetadataread_image_metadata.

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

FormatFormatFormatformatformat (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Graphic format.

Default: 'tiff' "tiff" "tiff" "tiff" "tiff"

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

TagNameTagNameTagNametagNametag_name (input_control)  tuple HTuplestrHTupleHtuple (string) (string) (HString) (char*)

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

Default: 'tiff_image_description' "tiff_image_description" "tiff_image_description" "tiff_image_description" "tiff_image_description"

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

TagValueTagValueTagValuetagValuetag_value (input_control)  tuple HTupleUnion[int, float, str]HTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)

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

FileNameFileNameFileNamefileNamefile_name (input_control)  filename.write HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Name of image file.

File extension: .tif, .tiff

Result

If TagValueTagValueTagValuetagValuetag_value can be correctly written for the specified parameters the operator write_image_metadatawrite_image_metadataWriteImageMetadataWriteImageMetadatawrite_image_metadata 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_infoget_extended_error_infoGetExtendedErrorInfoGetExtendedErrorInfoget_extended_error_info.

Possible Predecessors

write_imagewrite_imageWriteImageWriteImagewrite_image

Possible Successors

read_image_metadataread_image_metadataReadImageMetadataReadImageMetadataread_image_metadata

Module

Foundation