diff --git a/desktop/src/app/camera/camera.component.html b/desktop/src/app/camera/camera.component.html
index 1fd6f26a7..218b3f965 100644
--- a/desktop/src/app/camera/camera.component.html
+++ b/desktop/src/app/camera/camera.component.html
@@ -14,7 +14,7 @@
size="small" severity="info" pTooltip="Connect" tooltipPosition="bottom" />
@@ -25,7 +25,7 @@
tooltipPosition="bottom">
-
{{ savePath || capturesPath }}
@@ -240,4 +240,34 @@
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/desktop/src/app/camera/camera.component.ts b/desktop/src/app/camera/camera.component.ts
index d3711af0a..f89521abd 100644
--- a/desktop/src/app/camera/camera.component.ts
+++ b/desktop/src/app/camera/camera.component.ts
@@ -6,7 +6,7 @@ import { ElectronService } from '../../shared/services/electron.service'
import { PreferenceService } from '../../shared/services/preference.service'
import {
AutoSubFolderMode, Camera, CameraCaptureEvent,
- CameraStartCapture, ExposureMode, ExposureTimeUnit, FilterWheel, FrameType
+ CameraStartCapture, Dither, ExposureMode, ExposureTimeUnit, FilterWheel, FrameType
} from '../../shared/types'
import { AppComponent } from '../app.component'
@@ -28,6 +28,14 @@ export class CameraComponent implements AfterContentInit, OnDestroy {
wheel?: FilterWheel
+ showDitheringDialog = false
+ readonly dithering: Dither = {
+ enabled: false,
+ afterExposures: 1,
+ amount: 1.5,
+ raOnly: false,
+ }
+
readonly cameraMenuItems: MenuItem[] = [
{
icon: 'mdi mdi-content-save',
@@ -88,6 +96,16 @@ export class CameraComponent implements AfterContentInit, OnDestroy {
},
],
},
+ {
+ separator: true,
+ },
+ {
+ icon: 'icomoon random-dither',
+ label: 'Dithering',
+ command: () => {
+ this.showDitheringDialog = true
+ },
+ },
]
cooler = false
@@ -299,6 +317,7 @@ export class CameraComponent implements AfterContentInit, OnDestroy {
autoSave: this.autoSave,
savePath: this.savePath,
autoSubFolderMode: this.autoSubFolderMode,
+ dither: this.dithering,
}
await this.browserWindow.openCameraImage(this.camera!)
@@ -399,6 +418,11 @@ export class CameraComponent implements AfterContentInit, OnDestroy {
this.gain = this.preference.get(`camera.${this.camera.name}.gain`, 0)
this.offset = this.preference.get(`camera.${this.camera.name}.offset`, 0)
this.frameFormat = this.preference.get(`camera.${this.camera.name}.frameFormat`, this.camera.frameFormats[0] || '')
+
+ this.dithering.enabled = this.preference.get(`camera.${this.camera.name}.dithering.enabled`, false)
+ this.dithering.raOnly = this.preference.get(`camera.${this.camera.name}.dithering.raOnly`, false)
+ this.dithering.amount = this.preference.get(`camera.${this.camera.name}.dithering.amount`, 1.5)
+ this.dithering.afterExposures = this.preference.get(`camera.${this.camera.name}.dithering.afterExposures`, 1)
}
}
@@ -424,6 +448,11 @@ export class CameraComponent implements AfterContentInit, OnDestroy {
this.preference.set(`camera.${this.camera.name}.gain`, this.gain)
this.preference.set(`camera.${this.camera.name}.offset`, this.offset)
this.preference.set(`camera.${this.camera.name}.frameFormat`, this.frameFormat)
+
+ this.preference.set(`camera.${this.camera.name}.dithering.enabled`, this.dithering.enabled)
+ this.preference.set(`camera.${this.camera.name}.dithering.raOnly`, this.dithering.raOnly)
+ this.preference.set(`camera.${this.camera.name}.dithering.amount`, this.dithering.amount)
+ this.preference.set(`camera.${this.camera.name}.dithering.afterExposures`, this.dithering.afterExposures)
}
}
diff --git a/desktop/src/assets/fonts/icomoon.ttf b/desktop/src/assets/fonts/icomoon.ttf
new file mode 100644
index 000000000..796fd516a
Binary files /dev/null and b/desktop/src/assets/fonts/icomoon.ttf differ
diff --git a/desktop/src/assets/icons/CREDITS.md b/desktop/src/assets/icons/CREDITS.md
index cc3b92b80..20473d755 100644
--- a/desktop/src/assets/icons/CREDITS.md
+++ b/desktop/src/assets/icons/CREDITS.md
@@ -17,7 +17,7 @@
* https://www.flaticon.com/free-icon/rotate_3303063
* https://www.flaticon.com/free-icon/location_4631354
* https://www.flaticon.com/free-icon/rgb-print_7664547
-* https://www.flaticon.com/free-icon/setting_839374
+* https://www.flaticon.com/free-icon/cogwheel_3953226
* https://www.flaticon.com/free-icon/target_10542035
* https://www.flaticon.com/free-icon/contrast_439842
* https://www.flaticon.com/free-icon/full-moon_9689786
@@ -28,3 +28,4 @@
* https://www.flaticon.com/free-icon/satellite_1086093
* https://www.flaticon.com/free-icon/schedule_3652191
* https://www.flaticon.com/free-icon/search_10770011
+* https://thenounproject.com/icon/random-dither-4259782/
diff --git a/desktop/src/assets/icons/random-dither.svg b/desktop/src/assets/icons/random-dither.svg
new file mode 100644
index 000000000..58f0c9c73
--- /dev/null
+++ b/desktop/src/assets/icons/random-dither.svg
@@ -0,0 +1 @@
+
diff --git a/desktop/src/assets/icons/settings.png b/desktop/src/assets/icons/settings.png
index 9ecff263a..2c8a74b86 100644
Binary files a/desktop/src/assets/icons/settings.png and b/desktop/src/assets/icons/settings.png differ
diff --git a/desktop/src/shared/types.ts b/desktop/src/shared/types.ts
index 57e5b6364..84b03001e 100644
--- a/desktop/src/shared/types.ts
+++ b/desktop/src/shared/types.ts
@@ -182,6 +182,13 @@ export interface FilterWheel extends Device {
moving: boolean
}
+export interface Dither {
+ enabled: boolean
+ amount: number
+ raOnly: boolean
+ afterExposures: number
+}
+
export interface CameraStartCapture {
exposureInMicroseconds: number
exposureAmount: number
@@ -199,6 +206,7 @@ export interface CameraStartCapture {
autoSave: boolean
savePath?: string
autoSubFolderMode: AutoSubFolderMode
+ dither?: Dither
}
export interface CameraCaptureEvent {
diff --git a/desktop/src/styles.scss b/desktop/src/styles.scss
index 5665fabf4..bfa3271e2 100644
--- a/desktop/src/styles.scss
+++ b/desktop/src/styles.scss
@@ -169,4 +169,27 @@ i.mdi {
::-webkit-scrollbar-track {
border-radius: 10px;
background-color: transparent;
+}
+
+@font-face {
+ font-family: 'icomoon';
+ src: url('assets/fonts/icomoon.ttf');
+ font-weight: normal;
+ font-style: normal;
+ font-display: block;
+}
+
+.icomoon {
+ font-family: 'icomoon' !important;
+ font-style: normal;
+ font-weight: normal;
+ font-variant: normal;
+ text-transform: none;
+ line-height: 1;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+
+ &.random-dither:before {
+ content: "\e900";
+ }
}
\ No newline at end of file