Skip to content

Releases: Kashif-E/Kamera

1.1

30 Jun 07:52
4b9df02

Choose a tag to compare

Fixed

  • Android photos cropped / reduced field-of-view (#136): stills were zoomed-in vs the preview because CameraK always bound a 16:9 VideoCapture alongside the photo use case, and the shared ViewPort shrank the common field of view. VideoCapture is now bound lazily (only while recording), so photos use the full sensor FOV. Recording-lifecycle guards added (reject double-start / lens switch mid-recording; roll back a failed start).
  • Android captured photo aspect ratio & orientation (#136): the saved photo now matches the preview (display-driven ViewPort + capture rotation), across all four ratios × both orientations.
  • Android rotation during recording (#147): a portrait↔landscape flip mid-recording no longer tears down the recording; the rebuild is deferred to finalize. setTargetOrientation(null) reverts to the display rotation.

Changed (behavior)

  • targetResolution no longer overrides aspectRatio (Android).
  • Display-locked activities produce photos in that orientation.

Verified on a Galaxy S23. Maven Central: io.github.kashif-mehmood-km:camerak:1.1 (+ plugins).

Kamera 1.0

19 Jun 09:22
879a9e0

Choose a tag to compare

Kamera (formerly CameraK) reaches 1.0 — a Kotlin Multiplatform camera library for Compose Multiplatform on Android, iOS, and Desktop.

Install

dependencies {
    implementation("io.github.kashif-mehmood-km:camerak:1.0")

    // optional plugins
    implementation("io.github.kashif-mehmood-km:image_saver_plugin:1.0")
    implementation("io.github.kashif-mehmood-km:qr_scanner_plugin:1.0")
    implementation("io.github.kashif-mehmood-km:ocr_plugin:1.0")
    implementation("io.github.kashif-mehmood-km:video_recorder_plugin:1.0")
    implementation("io.github.kashif-mehmood-km:analyzer_plugin:1.0")
}

Fixed

  • Android aspect ratio mismatch (#136#137): a configured ratio (e.g. RATIO_4_3) no longer produces a photo that's a crop of the full-screen field of view. The preview is now letterboxed to the configured ratio (FIT_CENTER) so what you see equals what you capture, driven by the actual screen orientation.
  • iOS underexposed / black photos (#138): fixed a MemoryManager miscalculation that reported 100% memory usage permanently, which made every capture downshift the session preset right before the shot — underexposing stills (most visibly front-camera selfies) while the preview looked fine.
  • Plugin lifecycle leaks (#140): plugins could stack analyzers/outputs on every camera re-init and leak coroutines/outputs past detach. All five plugins (ImageSaver, QR, OCR, Analyzer, VideoRecorder) now tear down and re-register idempotently; pluginScope is owned by the state holder and cancelled on shutdown; ImageSaver no longer double-saves after a re-attach; VideoRecorder guards double-start and won't hang on stop.

Added / Changed

  • CameraController.getAspectRatio() and an orientation-aware preview-ratio helper.
  • Plugin teardown APIs: removeImageCaptureListener(...), and on iOS safeRemoveOutput(...) / clearMetadataObjectsDelegate().
  • Result flows are buffered (DROP_OLDEST); OCR's ocrFlow is re-attach-safe.
  • Desktop saveImage writes to a real per-user directory and honors the configured format.
  • Improved barcode/QR detection (Android + iOS), mirrorFrontCamera option, opt-in CameraKLogger, channels→flows for the desktop pipeline, and the removal of deprecated/legacy APIs landed in the lead-up to 1.0 — see the changelog.

Requirements

Android API 21+ (CameraX) · iOS 13+ (AVFoundation) · Desktop JDK 17+ (JavaCV).

Thanks

A huge thank you to everyone who contributed code, fixes, demos, and bug reports that got Kamera to 1.0:

@ShadAdman · @shadman-sportsgamex · @zelitomas · @adamglin0 · @Martmists-GH · @raunovillberg · @licryle · @EsmaeelNabil · @juliusspencer · @jeremylcarter · @maciek-s · @RaedGhazal · @yannickpulver · @carlosftorres · @lopspower

And special thanks to @kanphis for the detailed Android aspect-ratio (#136) and iOS exposure (#138) reports plus on-device diagnosis. 🙏

Full details in CHANGELOG.md.

0.4

04 Mar 15:07
d6656c7

Choose a tag to compare

0.4

What's Changed

Full Changelog: 0.3.0...0.4

0.2.0

28 Jan 16:40
40ae639

Choose a tag to compare

What's Changed

  • Update LICENSE to Apache 2.0 and add feature request template by @Kashif-E in #89
  • Add community health files by @Kashif-E in #90
  • feat: Add Compose-first reactive API with backward-compatible legacy support by @Kashif-E in #91

Full Changelog: 0.1.0...0.2.0

0.1.0

27 Jan 23:24
22f75e5

Choose a tag to compare

What's Changed

  • Add comprehensive codebase documentation and understanding guides by @Copilot in #65
  • Add cameraDeviceType setupSession by @lopspower in #64
  • Updates coil-network-ktor2 to coil-network-ktor3 and coil to 3.3.0 by @EsmaeelNabil in #81
  • Fix image orientation issues on iOS by normalizing pixel data before … by @Kashif-E in #85
  • parity issues between platforms by @Kashif-E in #86
  • docs: update README with new features and deprecations by @Kashif-E in #87
  • Version bump and docs by @Kashif-E in #88

New Contributors

Full Changelog: 0.0.12...0.1.0

0.0.12

13 May 11:39
8ccee5d

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.0.11...0.0.12

0.0.11

03 Apr 17:37

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.0.9...0.0.11

0.0.9

01 Feb 20:13
cb5aa46

Choose a tag to compare

What's Changed

Full Changelog: 0.0.8...0.0.9

0.0.8

08 Jan 12:01
39f7762

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.0.7...0.0.8

0.0.7

27 Sep 18:55
c003999

Choose a tag to compare

  • Implemented new design for APIs
  • Implemented Plugin apis
  • added image saver and qr scanner api