chore: remove flip x and y

This commit is contained in:
Ibrahima G. Coulibaly
2025-07-07 01:50:20 +01:00
parent 3eaf8e41b0
commit 72c6cc541c
3 changed files with 6 additions and 31 deletions

View File

@@ -18,19 +18,7 @@ export const processImage = async (
// Get current transform attribute or create new one
let currentTransform = svgElement.getAttribute('transform') || '';
// Calculate rotation angle
let angle = 0;
if (rotateMethod === 'Preset') {
if (rotateAngle === 'flip-x') {
currentTransform += ' scale(-1,1)';
} else if (rotateAngle === 'flip-y') {
currentTransform += ' scale(1,-1)';
} else {
angle = parseInt(rotateAngle);
}
} else {
angle = parseInt(rotateAngle);
}
const angle = parseInt(rotateAngle);
// Add rotation if needed
if (angle !== 0) {
@@ -65,18 +53,7 @@ export const processImage = async (
await ffmpeg.writeFile('input', await fetchFile(file));
// Determine rotation command
let rotateCmd = '';
if (rotateMethod === 'Preset') {
if (rotateAngle === 'flip-x') {
rotateCmd = 'hflip';
} else if (rotateAngle === 'flip-y') {
rotateCmd = 'vflip';
} else {
rotateCmd = `rotate=${rotateAngle}*PI/180`;
}
} else {
rotateCmd = `rotate=${rotateAngle}*PI/180`;
}
const rotateCmd = `rotate=${rotateAngle}*PI/180`;
// Execute FFmpeg command
await ffmpeg.exec([