LanguageValues and typesStandard typesMedia and visual
ExifOrientation
On this page
How a stored photo must be turned to look upright, as a camera records it.
Use it to display or process photos. top_left is 1, which needs no turning.
Shape
One of these 8 values:
| Value | Written |
|---|---|
ExifOrientation.top_left |
1 |
ExifOrientation.top_right |
2 |
ExifOrientation.bottom_right |
3 |
ExifOrientation.bottom_left |
4 |
ExifOrientation.left_top |
5 |
ExifOrientation.right_top |
6 |
ExifOrientation.right_bottom |
7 |
ExifOrientation.left_bottom |
8 |
Example
ExifOrientation.right_toptext.parse(raw, as: ExifOrientation) reads one from text that comes from outside. Text that isn't one at all fails malformed, such as 0, 9 or 06.
Good to know
- It is written as the number a camera records, from
1to8. ==tells you whether two are the same.<andlist.sort_bydon't take it.
In JSON
A string, in a request, a response or json.write:
"1""6""8"
Details
Text form, storage, how it is shown, and operations
ExifOrientation is in the group Media and visual, and has been in Jadpo since 0.1.0.
Text form
text.from writes one standard text form, the same form text.parse reads back: 1, 6 and 8.
How it is stored
It is stored in one column named for the field, of type text. 6 is stored as '6'.
How it is shown to people
text.format(value, locale:) shows it to people in their locale.
With locale: Locale.en_gb:
| Value | Shown |
|---|---|
1 |
1 |
6 |
6 |
8 |
8 |
Operations
It also takes text.parse, text.from, text.format, json.read, json.write and ==. How every standard type behaves says how they work.
Markdown for agents: /docs/types/type-exif-orientation.md.Built from Jadpo main at aee2e8f.