-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiplatform ImageViewer desktop camera support #2907
base: master
Are you sure you want to change the base?
Multiplatform ImageViewer desktop camera support #2907
Conversation
@@ -30,7 +30,14 @@ compose.desktop { | |||
|
|||
val iconsRoot = project.file("../common/src/desktopMain/resources/images") | |||
macOS { | |||
iconFile.set(iconsRoot.resolve("icon-mac.icns")) | |||
//iconFile.set(iconsRoot.resolve("icon-mac.icns")) does not exist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was required because it could not find this file.
@@ -15,5 +15,6 @@ allprojects { | |||
mavenCentral() | |||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") | |||
mavenLocal() | |||
maven("https://jitpack.io") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't add jitpack dependencies because of potential security risks.
Also, we can't add this dependency as a jar, because it is not convenient.
This is now available in maven central. Any update? @DevSrSouza |
Clone correct branch:
git clone -b feat/imageviewer-desktop-camera https://github.com/DevSrSouza/compose-jb.git
This Pull Request adds support for Camera in Desktop app by using webcam-capture library and converting it RGB ByteArray to Compose/Skiko ARGB to display the image capture as Compose ImageBitmap.
For running the application in MacOS, the apps requires camera permission, so I had to add a
runtime-entitlements.plist
withcom.apple.security.device.camera
and infoPlist entryNSCameraUsageDescription
.How to test on MacOS:
./gradlew :desktopApp:createDistributable
open desktopApp/build/compose/binaries/main/app/ImageViewer.app
Screen.Recording.2023-03-21.at.21.10.21.mp4