Skip to content

Add batch folder conversion UI and background processing#1

Open
bumbitzu wants to merge 1 commit intomasterfrom
codex/add-batch-conversion-feature-to-app
Open

Add batch folder conversion UI and background processing#1
bumbitzu wants to merge 1 commit intomasterfrom
codex/add-batch-conversion-feature-to-app

Conversation

@bumbitzu
Copy link
Owner

Motivation

  • Provide a folder-based (batch) conversion workflow so users can convert many images by selecting an input and output folder while keeping existing single-file conversion unchanged.
  • Keep the UI responsive during batch operations and surface progress/error information to the user.
  • Reuse the existing conversion engine and supported-extension list (from Filter.flt) without adding external dependencies.

Description

  • Added new WinForms controls to the main window for folder-based conversion: btnSelectInputFolder, txtInputFolder, btnSelectOutputFolder, txtOutputFolder, btnConvertFolder, progressBarBatch, lblBatchStatus, and txtBatchLog (layout updated in MainWindow.Designer.cs).
  • Implemented folder selection, validation, and batch pipeline in MainWindow.cs, including: TrySelectFolder, ValidateInputFolder, ValidateOutputFolder, GetInputImages, GetUniqueOutputPath, ConvertSingleImage, and ConvertBatch.
  • Discovered supported input extensions by parsing Filter.flt in InitializeSupportedExtensions so the batch file selection matches single-file support; output extension is taken from the currently selected output format radio button.
  • Batch conversion runs on a background task (Task.Run) and reports progress using IProgress<T> so UI updates are marshaled to the UI thread; UI controls are disabled during conversion and re-enabled afterwards.
  • Error handling: per-file exceptions are collected and shown in txtBatchLog and in a summary MessageBox after the run; output naming avoids overwrites by appending _1, _2, ... when necessary.
  • Files modified: MagiConvert/MainWindow.cs (logic and helpers added) and MagiConvert/MainWindow.Designer.cs (UI controls + layout updates).

Testing

  • No automated tests were run against these changes.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant