tiffany
0.1.3indexedLibrary enables reading and writing of Tagged Image File Format (TIFF) files, offering multi-platform support. Inspired by TIFF Java, supports parsing, raster extraction, and TIFF file creation.
Library enables reading and writing of Tagged Image File Format (TIFF) files, offering multi-platform support. Inspired by TIFF Java, supports parsing, raster extraction, and TIFF file creation.
The library inspired by the TIFF Java developed at the National Geospatial-Intelligence Agency (NGA) in collaboration with BIT Systems. The software use, modification, and distribution rights are stipulated within the MIT license.
If you'd like to contribute to this project, please make a pull request. We'll review the pull request and discuss the changes. All pull request contributions to this project will be released under the MIT license.
Tiffany is a Kotlin Multiplatform library for reading and writing Tagged Image File Format files. Implementation is based on the TIFF specification and ported from TIFF Java implementation: https://github.com/ngageoint/tiff-java/
View the latest Javadoc TODO
//val data: ByteArray = ...
val tiffFile: TIFFImage = TiffReader(data).readTiff()
val fileDirectories: List<FileDirectory> = tiffFile?.fileDirectories
// read the first directory in tiff file
val fileDirectory = fileDirectories[]
rasters: TypedRasters = fileDirectory.readTypedRasters()
rasterWidth = rasters.width
rasterHeight = rasters.height
samples1: ShortArray = (rasters.samples[] TypedSample.ShortSample).
samples2: ShortArray = (rasters.samples[] TypedSample.ShortSample).
val tiffImage: TiffImage = ...
val tiffBytes: ByteArray = TiffWriter().writeTiffToBytes(tiffImage)
TODO provide link to the maven once published
Build this repository using Gradle:
./gradlew build
Publish to local maven for local testing:
./gradlew publishToMavenLocal
Surfaced from shared tags and platforms — no rankings paid for.