diff --git a/src/App.tsx b/src/App.tsx
index 4fafc28..f9d8096 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -365,6 +365,7 @@ export default function App() {
)}
+ 0.9.1 beta
diff --git a/src/utils/mediaConverter.ts b/src/utils/mediaConverter.ts
index c0dcefb..a3082f0 100644
--- a/src/utils/mediaConverter.ts
+++ b/src/utils/mediaConverter.ts
@@ -121,8 +121,28 @@ async function convertWithImageMagick(
onProgress(50); // halfway: reading complete
- // Convert to the specified format
- const format = MagickFormat[targetFormat.toUpperCase() as keyof typeof MagickFormat];
+ // Map common format names to MagickFormat enum values
+ const formatMap: Record = {
+ 'png': 'Png',
+ 'jpg': 'Jpg',
+ 'jpeg': 'Jpg',
+ 'webp': 'WebP',
+ 'gif': 'Gif',
+ 'bmp': 'Bmp',
+ 'tiff': 'Tiff'
+ };
+
+ const formatKey = formatMap[targetFormat.toLowerCase()];
+ if (!formatKey) {
+ reject(new Error(`Unsupported target format: ${targetFormat}`));
+ return;
+ }
+
+ const format = MagickFormat[formatKey];
+ onLog(`Converting to format: ${formatKey}`);
+
+ // Set the format and convert
+ image.format = format;
image.write(format, (data: Uint8Array) => {
if (isCancelled) {
reject(new Error('Conversion cancelled'));