You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ The tool auto-detects likely geometries and emits the top N PNGs per input.
9
9
- Uses the embedded palette (last 32 bytes) decoded as Amiga RGB4.
10
10
- Detects geometry by measuring row smoothness/banding; sorts best-first.
11
11
- Outputs multiple candidates with descriptive suffixes (`_candNN_<WxH>.png`).
12
-
- Works on single files or whole directories; configurable max candidates, bitplane range, and geometry search ranges.
12
+
- Works on single files or whole directories; configurable max candidates, bitplane range, palette requirement, and geometry search ranges.
13
13
- Cross-platform (.NET 8 + ImageSharp)
14
14
15
15
## Requirements
@@ -51,6 +51,7 @@ Candidate PNGs are written under the chosen output directory with names based on
51
51
## CLI options
52
52
-`-n`, `--max-candidates` (default: 5): How many best geometry candidates to emit per file.
53
53
-`-p`, `--raw-file-pattern` (default: `*.raw`): Filename pattern to match for RAW files when input is a directory.
54
+
-`--require-palette` (default: true): If true, expect a palette footer; if false, use all bytes as planar data and generate a grayscale palette.
54
55
-`--min-planes` (default: 3): Minimum bitplane count to evaluate when guessing geometry.
55
56
-`--max-planes` (default: 6): Maximum bitplane count to evaluate when guessing geometry.
56
57
-`--min-width` (default: 64): Minimum image width (pixels) to evaluate when guessing geometry.
@@ -60,7 +61,7 @@ Candidate PNGs are written under the chosen output directory with names based on
60
61
-`--width-increment` (default: 16): Step (pixels) between tested widths when scanning candidates.
61
62
62
63
## Notes on geometry detection
63
-
- Defaults to scanning 3–6 bitplanes (common Amiga modes); plane counts that need more palette entries than are present are skipped.
64
+
- Defaults to scanning 3–6 bitplanes (common Amiga modes); plane counts that need more palette entries than are present are skipped. With `--require-palette false`, a grayscale palette sized to the maximum plane count is generated.
64
65
- By default scans widths from 64 to 640 pixels in steps of 16 (`--min-width`, `--max-width`, `--width-increment`).
65
66
- Width must be divisible by 8 and exactly consume the planar data (given height and plane count) or the candidate is skipped.
66
67
- Scores candidates by row smoothness (mean + stddev of row deltas); lower is better.
@@ -71,7 +72,7 @@ The last 32 bytes are 16 big-endian words, layout `0RRR GGGG BBBB` (4 bits/chann
71
72
each channel is scaled to 0–255 for PNG output.
72
73
73
74
## Limitations & gotchas
74
-
-Expects the palette to be the final 32 bytes; extra non-planar data at the end will confuse detection.
75
-
-Palette contains 16 entries (Amiga RGB4); bitplane counts requiring more colors are ignored.
75
+
-When `--require-palette` is true, expects the palette to be the final 32 bytes; extra non-planar data at the end will confuse detection.
76
+
-With autogenerated grayscale palette, bitplane counts requiring more colors than the generated palette size (based on max planes) are ignored.
76
77
- Width/height search ranges are controlled via CLI options; exotic sizes outside the search window will not be considered.
77
78
- Smoothness scoring can still pick a wrong candidate for very noisy or synthetic images—inspect the outputs.
0 commit comments