add independent packaging scripts

This commit is contained in:
2023-06-04 15:43:21 +02:00
parent 0ea2d1d375
commit ab6d07d4bd
6 changed files with 103 additions and 18 deletions

View File

@@ -39,6 +39,8 @@ class UpscalingHandler {
// add additional options
// baseCommand += + ' -S ' + options.sharpening
// baseCommand += ' -E ' + options.engine + ' -M ' + options.algorithm
console.log( 'upscaling' );
let child = child_process.spawn( baseCommand, args );
@@ -52,6 +54,7 @@ class UpscalingHandler {
} );
child.on( 'error', ( error ) => {
console.log( 'An error occurred' + error );
new Notification( { title: `ImageVideoUpscaler - Error whilst upscaling', body: 'Your upscaling Job encountered an error whilst upscaling. (Error message: ${ error.message }).`} )
} );

View File

@@ -12,11 +12,15 @@
<option v-for="engine in engines[ upscaleSettings.engine ][ 'modes' ]" :key="engine.id" :value="engine.id">{{ engine.displayName }}</option>
</select><br>
<label for="scale" v-if="engines[ upscaleSettings.engine ][ 'supports' ].includes( 'upscaling' )">Scale factor</label><br>
<input type="number" name="scale" id="scale" v-model="upscaleSettings.scale" min="2" max="4" onkeydown="return false">x<br>
<div v-if="engines[ upscaleSettings.engine ][ 'supports' ].includes( 'upscaling' )">
<label for="scale">Scale factor</label><br>
<input type="number" name="scale" id="scale" v-model="upscaleSettings.scale" min="2" max="4" onkeydown="return false">x<br>
</div>
<label for="sharpening" v-if="engines[ upscaleSettings.engine ][ 'supports' ].includes( 'sharpening' )">Sharpening factor</label><br>
<input type="number" step="0.01" name="scale" id="scale" v-model="upscaleSettings.sharpening" min="0" max="1"><br>
<div v-if="engines[ upscaleSettings.engine ][ 'supports' ].includes( 'sharpening' )">
<label for="sharpening">Sharpening factor</label><br>
<input type="number" step="0.01" name="scale" id="scale" v-model="upscaleSettings.sharpening" min="0" max="1"><br>
</div>
<button @click="runCommand( 'InputFile' )">Input file</button><br>
<button @click="runCommand( 'OutputFile' )">Output file</button><br>
@@ -68,7 +72,7 @@ export default {
data() {
return {
upscaleSettings: { 'engine': 'ffc', 'algorithm': 'fsr', 'scale': 2, 'sharpening': 0, 'InputFile': [ '/home/janis/projects/myevent/assets/logo.png' ], 'OutputFile': '/home/janis/Downloads/test.png' },
engines: { 'ffc':{ 'displayName': 'FidelityFX CLI', 'id': 'ffc', 'modes': { 'fsr': { 'displayName': 'FidelityFX Super Resolution', 'id': 'fsr' } }, 'supports': [ 'upscaling', 'sharpening' ] }, 'ss':{ 'displayName': 'REAL-ESGRAN', 'id': 'ss' } },
engines: { 'ffc':{ 'displayName': 'FidelityFX CLI', 'id': 'ffc', 'modes': { 'fsr': { 'displayName': 'FidelityFX Super Resolution', 'id': 'fsr' }, 'c': { 'displayName': 'Cubic', 'id': 'c' }, 'hqc': { 'displayName': 'High Quality Cubic', 'id': 'hqc' } }, 'supports': [ 'upscaling', 'sharpening' ] }, 'ss':{ 'displayName': 'REAL-ESRGAN', 'id': 'ss', 'modes': { 'av3': { 'displayName': 'realesr-animevideov3', 'id': 'av3' }, 'x4plus': { 'displayName': 'realesrgan-x4plus-anime', 'id': 'x4plus' } }, 'supports': [ 'upscaling' ] } },
fixed: false,
output: '',
}