Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions commons/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ dependencies {
implementation(libs.bundles.lifecycle)
implementation(libs.bundles.compose)
implementation(libs.compose.view.binding)
implementation(libs.jxl.integration)
debugImplementation(libs.bundles.compose.preview)

api(libs.joda.time)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import org.fossify.commons.views.MyTextView
import java.io.File
import java.io.InputStream
import java.util.*
import com.awxkee.jxlcoder.JxlCoder
import android.graphics.Point

class PropertiesDialog : BasePropertiesDialog {
private var mCountHiddenItems = false
Expand Down Expand Up @@ -143,7 +145,23 @@ class PropertiesDialog : BasePropertiesDialog {
}

fileDirItem.path.isImageSlow() -> {
fileDirItem.getResolution(mActivity)?.let { addProperty(R.string.resolution, it.formatAsResolution()) }
if(fileDirItem.name.endsWith(".jxl")) {
var jxlCode = JxlCoder
var size = jxlCode.getSize(File(fileDirItem.path).readBytes())
if(size != null) {
var point = Point(size.width, size.height)
addProperty(R.string.resolution, point.formatAsResolution())
}

}else {
fileDirItem.getResolution(context = mActivity)
?.let {
addProperty(
labelId = R.string.resolution,
value = it.formatAsResolution()
)
}
}
}

fileDirItem.path.isAudioSlow() -> {
Expand Down
4 changes: 4 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ app-build-targetSDK = "36"
app-build-minimumSDK = "26"
app-build-javaVersion = "VERSION_17"
app-build-kotlinJVMTarget = "17"
#Other
jxlDecoder = "2.5.2"
[libraries]
#Android X
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
Expand Down Expand Up @@ -103,6 +105,8 @@ joda-time = { module = "joda-time:joda-time", version.ref = "jodaTime" }
#Kotlin
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
kotlin-immutable-collections = { module = "org.jetbrains.kotlinx:kotlinx-collections-immutable", version.ref = "kotlin-immutable-collections" }
#Other
jxl-integration = { group = "io.github.awxkee", name = "jxl-coder-glide", version.ref = "jxlDecoder" }
[bundles]
compose = [
"compose-activity",
Expand Down
Loading