ctucx.git: nimjpg

parse jpg file header

commit cf530668cf92d9d509744b54b93bd4101a5ae6c5
parent 98149b48234645420f9ded108ebf9c774b4a81ef
Author: Leah (ctucx) <leah@ctu.cx>
Date: Sat, 29 Jan 2022 11:18:48 +0100

fix build on nim 1.6.0
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/example.nim b/example.nim
@@ -1,8 +1,6 @@
-import os
+import os, tables, json
+import asyncdispatch, asyncfile
 import nimjpg
-import asyncdispatch
-import asyncfile
-import json
 
 var result: cint
 
diff --git a/example_sync.nim b/example_sync.nim
@@ -1,6 +1,5 @@
-import os
+import os, tables, json
 import nimjpg
-import json
 
 var result: cint
 
diff --git a/nimjpg.nim b/nimjpg.nim
@@ -94,7 +94,7 @@ proc collect_jpg*(file: Stream | AsyncFile): Future[JpgInfo] {.multisync,gcsafe.
       debug "found EXIF"
       let size = int(file.getSectionSize().await)
       discard file.readBuffer(buf, size).await
-      let ed = exif_data_new_from_data(cast[ptr[cuchar]](buf), cuint(size))
+      let ed = exif_data_new_from_data(cast[ptr[uint8]](buf), cuint(size))
       let ed_table = ed.collect_exif_data()
       if result.exifData.isNone:
         result.exifData = some(ed_table)