comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:db63d01a23c6
1 /*
2 * A basic test of the library: try to use it to print out the EXIF
3 * data.
4 */
5 package name.blackcap.exifwasher
6
7 import name.blackcap.exifwasher.exiv2.*
8
9 /* entry point */
10 fun main(args: Array<String>) {
11 println("java.class.path = " + System.getProperty("java.class.path"))
12 if (args.size != 1) {
13 System.err.println("expecting a file name")
14 System.exit(1)
15 }
16 val image = Image(args[0])
17 val meta = image.metadata
18 val keys = meta.keys
19 keys.sort()
20 keys.forEach {
21 val v = meta[it]
22 println("${it}: ${v.type} = ${v.value}")
23 }
24 }