Converts the text representation to an enumerated value.
the string.
a ImageKind, or as_image_kind_unknown for unknown.