diff src/name/blackcap/exifwasher/Test.kt @ 0:db63d01a23c6

JNI calls and test case (finally!) seem to work.
author David Barts <n5jrn@me.com>
date Tue, 31 Mar 2020 13:24:48 -0700
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/name/blackcap/exifwasher/Test.kt	Tue Mar 31 13:24:48 2020 -0700
@@ -0,0 +1,24 @@
+/*
+ * A basic test of the library: try to use it to print out the EXIF
+ * data.
+ */
+package name.blackcap.exifwasher
+
+import name.blackcap.exifwasher.exiv2.*
+
+/* entry point */
+fun main(args: Array<String>) {
+    println("java.class.path = " + System.getProperty("java.class.path"))
+    if (args.size != 1) {
+        System.err.println("expecting a file name")
+        System.exit(1)
+    }
+    val image = Image(args[0])
+    val meta = image.metadata
+    val keys = meta.keys
+    keys.sort()
+    keys.forEach {
+        val v = meta[it]
+        println("${it}: ${v.type} = ${v.value}")
+    }
+}