aboutsummaryrefslogtreecommitdiff
path: root/core/image/common.odin
diff options
context:
space:
mode:
authorIllusionMan1212 <hisham.abourgheba@gmail.com>2025-02-01 23:01:03 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2025-09-08 17:13:03 +0200
commitcb820eea4d77c2b06ac8c2fdb01fdcfad0053d38 (patch)
tree32f94952b1774f10888c595f95075229fb1df343 /core/image/common.odin
parent57a92b14cc1621efbf0eef61acf48b1b760917b1 (diff)
jpeg: extract Exif data
Diffstat (limited to 'core/image/common.odin')
-rw-r--r--core/image/common.odin10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/image/common.odin b/core/image/common.odin
index a12760265..0e5668e50 100644
--- a/core/image/common.odin
+++ b/core/image/common.odin
@@ -67,6 +67,13 @@ Image_Metadata :: union #shared_nil {
^JPEG_Info,
}
+Exif :: struct {
+ byte_order: enum {
+ little_endian,
+ big_endian,
+ },
+ data: []u8 `fmt:"-"`,
+}
/*
@@ -582,6 +589,7 @@ TGA_Info :: struct {
*/
JFIF_Magic := [?]byte{0x4A, 0x46, 0x49, 0x46} // "JFIF"
JFXX_Magic := [?]byte{0x4A, 0x46, 0x58, 0x58} // "JFXX"
+Exif_Magic := [?]byte{0x45, 0x78, 0x69, 0x66} // "Exif"
JPEG_Error :: enum {
None = 0,
@@ -704,7 +712,7 @@ JPEG_Info :: struct {
jfif_app0: Maybe(JFIF_APP0),
jfxx_app0: Maybe(JFXX_APP0),
comments: [dynamic]string,
- //exif: Maybe(Exif),
+ exif: [dynamic]Exif,
}
// Function to help with image buffer calculations