P6 Stream V: ImageCompression (expect/actual) + CameraPicker polish

Android: BitmapFactory + ExifInterface + JPEG quality 0.7 + 1920px downscale.
iOS: UIImage.jpegData. JVM/JS/WASM: no-op. CameraPicker uses TakePicture
ActivityResult + permission rationale.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Trey T
2026-04-18 13:35:54 -05:00
parent 3069ec41de
commit 10b57aabaa
10 changed files with 599 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
package com.tt.honeyDue.util
/**
* JVM / Desktop no-op implementation of [ImageCompression].
*
* Image compression on Desktop is not exercised by the app today — uploads
* happen from mobile only. Returning the input unchanged keeps call sites
* in common code compiling and functional (the server accepts the raw
* bytes at worst). Replace with an ImageIO/TwelveMonkeys pipeline if this
* path is ever needed.
*/
actual object ImageCompression {
actual suspend fun compress(
input: ByteArray,
maxEdgePx: Int,
quality: Float
): ByteArray = input
}