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:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user