Transcode heic/heif images

This commit is contained in:
Josh Perez 2021-08-09 16:06:21 -04:00 committed by GitHub
parent 440fb69efc
commit 9078919545
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 409 additions and 100 deletions

View file

@ -125,8 +125,10 @@ const { ChallengeMainHandler } = require('./ts/main/challengeMain');
const { NativeThemeNotifier } = require('./ts/main/NativeThemeNotifier');
const { PowerChannel } = require('./ts/main/powerChannel');
const { maybeParseUrl, setUrlSearchParams } = require('./ts/util/url');
const { getHeicConverter } = require('./ts/workers/heicConverterMain');
const sql = new MainSQL();
const heicConverter = getHeicConverter();
let systemTrayService;
const systemTraySettingCache = new SystemTraySettingCache(
@ -640,6 +642,11 @@ ipc.on('title-bar-double-click', () => {
}
});
ipc.on('convert-image', async (event, uuid, data) => {
const { error, response } = await heicConverter(uuid, data);
event.reply(`convert-image:${uuid}`, { error, response });
});
let isReadyForUpdates = false;
async function readyForUpdates() {
if (isReadyForUpdates) {