setValue

Sets integer values into this tag. This method should be used for tags of type TYPE_UNSIGNED_SHORT . This method will fail if:

open fun setValue(value: Array<Int>): Boolean

Sets integer value into this tag. This method should be used for tags of type TYPE_UNSIGNED_SHORT , or TYPE_LONG . This method will fail if:

open fun setValue(value: Int): Boolean

Sets long values into this tag. This method should be used for tags of type TYPE_UNSIGNED_LONG . This method will fail if:

  • The component type of this tag is not TYPE_UNSIGNED_LONG .
  • The value overflows.
  • The value.length does NOT match the component count in the definition for this tag.

open fun setValue(value: Array<Long>): Boolean

Sets long values into this tag. This method should be used for tags of type TYPE_UNSIGNED_LONG . This method will fail if:

  • The component type of this tag is not TYPE_UNSIGNED_LONG .
  • The value overflows.
  • The component count in the definition for this tag is not 1.

open fun setValue(value: Long): Boolean

Sets Rational values into this tag. This method should be used for tags of type TYPE_UNSIGNED_RATIONAL , or TYPE_RATIONAL . This method will fail if:

  • The component type of this tag is not TYPE_UNSIGNED_RATIONAL or TYPE_RATIONAL .
  • The value overflows.
  • The value.length does NOT match the component count in the definition for this tag.

See also

Rational

open fun setValue(value: Array<Rational>): Boolean

Sets a Rational value into this tag. This method should be used for tags of type TYPE_UNSIGNED_RATIONAL , or TYPE_RATIONAL . This method will fail if:

See also

Rational

open fun setValue(value: Rational): Boolean

Sets byte values into this tag. This method should be used for tags of type TYPE_UNSIGNED_BYTE or TYPE_UNDEFINED . This method will fail if:

open fun setValue(value: Array<Byte>, offset: Int, length: Int): Boolean

Equivalent to setValue(value, 0, value.length).

open fun setValue(value: Array<Byte>): Boolean

Sets byte value into this tag. This method should be used for tags of type TYPE_UNSIGNED_BYTE or TYPE_UNDEFINED . This method will fail if:

open fun setValue(value: Byte): Boolean

Sets the value for this tag using an appropriate setValue method for the given object. This method will fail if:

  • The corresponding setValue method for the class of the object passed in would fail.
  • There is no obvious way to cast the object passed in into an EXIF tag type.

open fun setValue(obj: Any): Boolean

Sets a string value into this tag. This method should be used for tags of type TYPE_ASCII . The string is converted to an ASCII string. Characters that cannot be converted are replaced with '?'. The length of the string must be equal to either (component count -1) or (component count). The final byte will be set to the string null terminator '\0', overwriting the last character in the string if the value.length is equal to the component count. This method will fail if:

  • The data type is not TYPE_ASCII or TYPE_UNDEFINED .
  • The length of the string is not equal to (component count -1) or (component count) in the definition for this tag.

open fun setValue(value: String): Boolean