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
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,7 @@ Candidate PNGs are written under the chosen output directory with names based on
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
54
-`--require-palette` (default: true): If true, expect a palette footer; if false, use all bytes as planar data and generate a grayscale palette.
55
+
-`--header-skip` (default: 0): Number of bytes to skip at the start of the file before reading planar data.
55
56
-`--min-planes` (default: 3): Minimum bitplane count to evaluate when guessing geometry.
56
57
-`--max-planes` (default: 6): Maximum bitplane count to evaluate when guessing geometry.
57
58
-`--min-width` (default: 64): Minimum image width (pixels) to evaluate when guessing geometry.
@@ -61,7 +62,7 @@ Candidate PNGs are written under the chosen output directory with names based on
61
62
-`--width-increment` (default: 16): Step (pixels) between tested widths when scanning candidates.
62
63
63
64
## Notes on geometry detection
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.
65
+
- 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.`--header-skip` is applied before reading planar data or palettes.
65
66
- By default scans widths from 64 to 640 pixels in steps of 16 (`--min-width`, `--max-width`, `--width-increment`).
66
67
- Width must be divisible by 8 and exactly consume the planar data (given height and plane count) or the candidate is skipped.
67
68
- Scores candidates by row smoothness (mean + stddev of row deltas); lower is better.
@@ -72,7 +73,7 @@ The last 32 bytes are 16 big-endian words, layout `0RRR GGGG BBBB` (4 bits/chann
72
73
each channel is scaled to 0–255 for PNG output.
73
74
74
75
## Limitations & gotchas
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
+
- When `--require-palette` is true, expects the palette to be the final 32 bytes (after honoring `--header-skip`); extra non-planar data at the end will confuse detection.
76
77
- With autogenerated grayscale palette, bitplane counts requiring more colors than the generated palette size (based on max planes) are ignored.
77
78
- Width/height search ranges are controlled via CLI options; exotic sizes outside the search window will not be considered.
78
79
- Smoothness scoring can still pick a wrong candidate for very noisy or synthetic images—inspect the outputs.
0 commit comments