export heic convert api

This commit is contained in:
Abhinav 2022-10-14 23:07:07 +05:30
parent e2f7f7cee2
commit 7af36ee045
2 changed files with 4 additions and 1 deletions

View file

@ -1,7 +1,7 @@
import { ipcRenderer } from 'electron/renderer';
import { isPlatformMac } from '../utils/main';
export async function convertHEIC(fileData: Uint8Array) {
export async function convertHEIC(fileData: Uint8Array): Promise<Uint8Array> {
if (!isPlatformMac()) {
throw Error('native heic conversion only supported on mac');
}

View file

@ -36,6 +36,8 @@ import { selectRootDirectory, logToDisk } from './api/common';
import { fixHotReloadNext12 } from './utils/preload';
import { isFolder, getDirFiles } from './api/fs';
import { convertHEIC } from './api/heicConvert';
fixHotReloadNext12();
const windowObject: any = window;
@ -77,4 +79,5 @@ windowObject['ElectronAPIs'] = {
updateWatchMappingSyncedFiles,
updateWatchMappingIgnoredFiles,
logToDisk,
convertHEIC,
};