π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Use the implementation instead of the accidental infinite loop
Manav Rathie0cfa36f0862
diff --git a/web/apps/photos/src/services/heic-convert/heic-convert.ts b/web/apps/photos/src/services/heic-convert/heic-convert.tsindex 8d53af1520..e69de29bb2 100644--- a/web/apps/photos/src/services/heic-convert/heic-convert.ts+++ b/web/apps/photos/src/services/heic-convert/heic-convert.ts@@ -1,15 +0,0 @@-import HeicConvert from "heic-convert";-import { getUint8ArrayView } from "services/readerService";--/**- * Convert a HEIC file to a JPEG file.- *- * Both the input and output are blobs.- */-export const convertHEICToJPEG = async (heicBlob: Blob): Promise<Blob> => {- const filedata = await getUint8ArrayView(heicBlob);- const result = await HeicConvert({ buffer: filedata, format: "JPEG" });- const convertedFileData = new Uint8Array(result);- const convertedFileBlob = new Blob([convertedFileData]);- return convertedFileBlob;-};diff --git a/web/apps/photos/src/worker/convert.worker.ts b/web/apps/photos/src/worker/convert.worker.tsindex e654c68ee6..db9f37efae 100644--- a/web/apps/photos/src/worker/convert.worker.ts+++ b/web/apps/photos/src/worker/convert.worker.ts@@ -1,9 +1,25 @@import * as Comlink from "comlink";+import HeicConvert from "heic-convert";+import { getUint8ArrayView } from "services/readerService";export class DedicatedConvertWorker {async convertHEICToJPEG(fileBlob: Blob) {- return this.convertHEICToJPEG(fileBlob);+ return convertHEICToJPEG(fileBlob);}}Comlink.expose(DedicatedConvertWorker, self);++/**+ * Convert a HEIC file to a JPEG file.+ *+ * Both the input and output are blobs.+ */+export const convertHEICToJPEG = async (heicBlob: Blob): Promise<Blob> => {+ console.log("test")+ const filedata = await getUint8ArrayView(heicBlob);+ const result = await HeicConvert({ buffer: filedata, format: "JPEG" });+ const convertedFileData = new Uint8Array(result);+ const convertedFileBlob = new Blob([convertedFileData]);+ return convertedFileBlob;+};