add debugging logs
This commit is contained in:
parent
9879e6bf0a
commit
f028c163c1
|
@ -11,6 +11,7 @@ class ElectronHEICConverter {
|
|||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
async convert(fileBlob: Blob, format = 'JPEG'): Promise<Blob> {
|
||||
try {
|
||||
console.log(this.electronAPIs);
|
||||
if (this.allElectronAPIExists) {
|
||||
const inputFileData = new Uint8Array(
|
||||
await fileBlob.arrayBuffer()
|
||||
|
@ -18,6 +19,7 @@ class ElectronHEICConverter {
|
|||
const convertedFileData = await this.electronAPIs.convertHEIC(
|
||||
inputFileData
|
||||
);
|
||||
console.log('convertedFileData', convertedFileData.length);
|
||||
return new Blob([convertedFileData]);
|
||||
}
|
||||
} catch (e) {
|
||||
|
|
|
@ -21,7 +21,7 @@ import {
|
|||
FILE_TYPE,
|
||||
} from 'constants/file';
|
||||
import PublicCollectionDownloadManager from 'services/publicCollectionDownloadManager';
|
||||
import HEICConverter from 'services/heicConverter/heicConverterService';
|
||||
import ElectronHEICConverter from 'services/electron/heicConvert';
|
||||
import ffmpegService from 'services/ffmpeg/ffmpegService';
|
||||
import { NEW_FILE_MAGIC_METADATA, VISIBILITY_STATE } from 'types/magicMetadata';
|
||||
import { IsArchived, updateMagicMetadataProps } from 'utils/magicMetadata';
|
||||
|
@ -343,7 +343,10 @@ async function getRenderableImage(fileName: string, imageBlob: Blob) {
|
|||
imageBlob.size
|
||||
)}`
|
||||
);
|
||||
const convertedImageBlob = await HEICConverter.convert(imageBlob);
|
||||
const convertedImageBlob = await ElectronHEICConverter.convert(
|
||||
imageBlob
|
||||
);
|
||||
|
||||
addLogLine(`${fileName} successfully converted`);
|
||||
return convertedImageBlob;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue