export heic convert api
This commit is contained in:
parent
e2f7f7cee2
commit
7af36ee045
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue