Allows to check if a file is an image, if so check if it's truncated.
Written in Kotlin with ❤️.
Based on Archimedes Trajano's answer on StackOverflow.com
If using Kotlin:
val myFile = File(..)
val imageData = myFile.getImageData()
val myPath = Paths.get(...)
val imageData = myPath.getImageData()
If using Java:
File myFile = new File(..)
ImageData imageData = analyzeImage(myFile)
Path myPath = Paths.get(..)
ImageData imageData = analyzeImage(myPath)
Add the JitPack.io repository to the project build.grade
:
repositories {
maven { url 'https://jitpack.io' }
}
Then import the latest version in the build.gradle
of the modules you need:
dependencies {
implementation 'com.github.lamba92:kimagecheck:{latest_version}'
}
If using Gradle Kotlin DSL:
repositories {
maven(url = "https://jitpack.io")
}
...
dependencies {
implementation("com.github.lamba92", "kimagecheck", "{latest_version}")
}
For Maven:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
...
<dependency>
<groupId>com.github.Lamba92</groupId>
<artifactId>kimagecheck</artifactId>
<version>Tag</version>
</dependency>