feat(phase-1/m4.4e): real JVM EXIF orientation normalizer
The §6.3 EXIF row deferred implementation to "M4+ when the JVM attachment intake lands" — it landed in M4.4c, so the last NoOp placeholder is gone. JvmImageOrientationNormalizer keeps the Android contract exactly: orientation 6/3/8 -> bake 90/180/270 into pixels, re-encode JPEG @ 0.92, return input UNCHANGED for normal/absent/mirror tags or any decode/rotate failure. Tooling differs, contract doesn't: com.drewnoakes:metadata-extractor 2.19.0 (first Central pull this phase — recorded) for the tag read, BufferedImage + AffineTransform for the rotate, ImageIO JPEG writer at explicit 0.92 for the encode. DesktopContainer now wires it into NoteRepositoryImpl (was ImageOrientationNormalizer.NoOp). New probe: :core:data-jvm:orientationSmoke hand-builds an EXIF-Orientation-90 JPEG (APP1 splice — metadata-extractor is read-only) and asserts: no-EXIF passthrough, EXIF-90 rewrite, pixels rotated (4x2 -> 2x4), output stability, garbage passthrough. Verified: :core:data-jvm:orientationSmoke (RESULT: M4.4e PASS, 5/5) + ./gradlew assembleDebug :desktopApp:build SUCCESSFUL + :desktopApp:run --self-test (SELFTEST id=1 -> RENDER notes=1 selected=1); objectbox-models clean.
This commit is contained in:
1 parent
018db4819c
commit
0dc5935d1d
5 files changed
+207
-2
No files matched your search
@@ -68,6 +68,12 @@ dependencies {
|
||||
implementation(project(":core:backup"))
|
||||
implementation(libs.kotlinx.serialization.json)
|
||||
|
||||
// Phase 1 (M4.4e): EXIF orientation for the JVM normalizer — the
|
||||
// desktop counterpart of androidx.exifinterface that :core:data's
|
||||
// Android side uses (§6.3 EXIF row: "not cached, Maven Central
|
||||
// reachable" — pulled once here).
|
||||
implementation(libs.metadata.extractor)
|
||||
|
||||
// JVM counterparts of the objectbox-android the Android build uses.
|
||||
implementation(libs.objectbox.java)
|
||||
implementation(libs.objectbox.kotlin)
|
||||
@@ -95,6 +101,18 @@ tasks.register<JavaExec>("smoke") {
|
||||
doFirst { smokeDir.deleteRecursively() }
|
||||
}
|
||||
|
||||
/**
|
||||
* `./gradlew :core:data-jvm:orientationSmoke` — Phase 1 (M4.4e): feeds a
|
||||
* hand-crafted EXIF-Orientation-90 JPEG through JvmImageOrientationNormalizer
|
||||
* and checks the rotation is baked into the pixels (Android contract kept).
|
||||
*/
|
||||
tasks.register<JavaExec>("orientationSmoke") {
|
||||
group = "verification"
|
||||
description = "Proves EXIF orientation handling on the JVM."
|
||||
classpath = sourceSets["main"].runtimeClasspath
|
||||
mainClass.set("org.incido.data.jvm.OrientationSmokeKt")
|
||||
}
|
||||
|
||||
/**
|
||||
* `./gradlew :core:data-jvm:backupSmoke --args="<backup.incido.json> [libDir]"`
|
||||
* — feeds a REAL Android backup file through the :core:backup bridge on the
|
||||
|
||||
Reference in new issue
Block a user