comparison src/name/blackcap/exifwasher/exiv2/Image.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 * Represents an image file we're examining and manipulating the metadata of.
3 */
4 package name.blackcap.exifwasher.exiv2
5
6 public class Image(path: String) {
7 init {
8 Initialize.libraries()
9 }
10
11 private external fun _ctor(path: String): Long
12 private external fun _writeMetadata()
13 private external fun _getMetadata(): Long
14 private external fun _dtor()
15
16 private val pointer: Long
17 init {
18 pointer = _ctor(path)
19 }
20
21 val metadata: ExifData
22 get() {
23 return ExifData(_getMetadata())
24 }
25
26 fun store() = _writeMetadata()
27
28 protected fun finalize() = _dtor()
29 }