Q2TG/src/encoding/tgsToGif.ts

10 lines
255 B
TypeScript
Raw Normal View History

2022-03-02 10:29:14 +00:00
import { spawn } from 'child_process';
export default function tgsToGif(tgsPath: string) {
return new Promise(resolve => {
2022-09-11 16:28:42 +00:00
spawn(process.env.TGS_TO_GIF || 'tgs_to_gif', [tgsPath]).on('exit', () => {
2022-03-02 10:29:14 +00:00
resolve(tgsPath + '.gif');
});
});
}