# Meta Converter

## Overview

Meta Converter is a tool for converting multiple images to PNG, WEBP, or JPG while preserving AI-generated image metadata as much as possible.

Supported input formats are PNG, WEBP, and JPG. Supported output formats are PNG, WEBP, JPG, and same as input format.

## Supported AI Metadata

- **A1111 WebUI**: PNG / WEBP / JPG  
  Metadata is preserved so generation data can still be read with tools such as PNGInfo after conversion.
- **ComfyUI**: PNG / WEBP / JPG  
  In JPG files, `prompt` is preserved first, and large `workflow` data is preserved only when it fits within the JPG metadata limit. When converting to JPG, workflows can also be exported separately as JSON files. This can be turned on or off in settings.
- **NovelAI**: PNG / WEBP / JPG  
  When converting to JPG, a small `_meta` file can be exported separately to preserve metadata. This can be turned on or off in settings.

## System Requirements

- Windows 10 / 11 64-bit
- 8 GB memory or more recommended

## Installation

1. Extract the downloaded ZIP file.
2. Run `Meta_Converter.exe` in the extracted folder.

## Uninstallation

Delete the extracted folder to uninstall the application.

## Basic Usage

1. Select a folder containing images, or drag and drop image files or a folder.
2. Adjust the output format, conversion quality, resize settings, file size optimization, and other options as needed.
3. Click the `Start Conversion` button.

## Full Version and Trial Version

The trial version has the following limitation.

- Maximum number of images per run: 8

## Launch Options

```text
Meta_Converter.exe <Directory path>
```

Launches with the specified directory set as the input folder.

```text
Meta_Converter.exe <File path> [File path...]
```

Launches with the specified file or files selected. Multiple files are supported.

## CLI Conversion

Specify CLI-only options such as `--input` to run conversions from the command line without opening the GUI.

```text
Meta_Converter.exe --input "C:\images" --output "C:\out" --to jpg --quality 90
```

```text
Meta_Converter.exe --input "C:\images\a.png" --input "C:\images\b.webp" --same-dir --to png
```

```text
Meta_Converter.exe --input "C:\images" --from png,webp,jpg --to webp --quality 80 --webp-lossless
```

```text
Meta_Converter.exe --input "C:\images" --output "C:\out" --to same --quality 85
```

```text
Meta_Converter.exe --input "C:\images" --output "C:\out" --to same --quality 80 --optimize-file-size
```

### CLI Options

| Option | Description |
| --- | --- |
| `--input`, `-i` | Input file or folder. Can be specified multiple times. |
| `--output`, `-o` | Output folder. Cannot be used with `--same-dir`. |
| `--same-dir` | Output next to each input file. |
| `--from` | Input formats. Use `all`, `png`, `webp`, `jpg`, or comma-separated values such as `png,webp,jpg`. Unsupported format names are treated as errors. |
| `--to` | Output format. Supports `png`, `webp`, `jpg`, and `same`. `same` outputs each image in its input format. |
| `--quality` | Conversion quality from `0` to `100`. Default is `80`. |
| `--resize` | Resize percentage from `10` to `100`. Default is `100`. |
| `--optimize-file-size` | Enables file size optimization. Saves smaller files. PNG reduces colors. |
| `--webp-lossless` | Use lossless compression for WEBP output. |
| `--delete-original` | Delete source files after successful conversion. |
| `--recursive` / `--no-recursive` | Include subfolders when an input folder is specified. Default is `--recursive`. |
| `--novelai-meta` / `--no-novelai-meta` | Create NovelAI `_meta` files for JPG output. Default is `--novelai-meta`. |
| `--comfyui-json` / `--no-comfyui-json` | Export ComfyUI workflow JSON for JPG output. Default is `--comfyui-json`. |
| `--error-log-dir` | Folder for error log output. |
| `--log-file` | Save CLI logs to a text file. |
| `--json-report` | Save a JSON result report. |
| `--version` | Show the version. |
| `--help` | Show help. |

When running the executable from the current folder in PowerShell, add `.\` as in `.\Meta_Converter.exe` due to PowerShell command lookup behavior. CLI mode runs from the same GUI executable. Depending on the environment, CMD or PowerShell may not wait for the process to finish automatically. Use `start /wait` or PowerShell `Start-Process -Wait` when waiting for completion is required.

## Update History

- v1.00 (2025/05/11) - Initial release  
  https://note.com/nekzuk/n/nf7481fbb6cf0
- v2.00 (2025/08/15) - Added Eagle support and more  
  https://note.com/nekzuk/n/n58408ce641a8
- v2.50 (2025/09/18) - Added ComfyUI support and more  
  https://note.com/nekzuk/n/nb337180883e3
- v3.00 (2025/11/07) - Added NovelAI support and more  
  https://note.com/nekzuk/n/na7837cdb4a7b
- v3.50 (2026/02/04) - Added NovelAI WebP support  
  https://note.com/nekzuk/n/nf8f1cad57493
- v4.00 (2026/06/19) - Added JPG input, CLI support, and compression support
  https://note.com/nekzuk/n/nf6e3ea75825b
  
## Support

If you encounter bugs or have questions, please contact us via Booth messages or X.
