Call parseNumber or parseWholeNumber directly for RGBGFX's CLI args

This matches the design of the other three programs, and avoids
silent overflow of `uint16_t` or `uint8_t` bounds.
This commit is contained in:
Rangi authored and Eldred Habert committed 2026-11-29 13:02:53 +01:00
1 parent 84a7a69506
commit 2bbaef0541
5 files changed
+107 -72

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
error: Bit depth must be 1 or 2, not 258
Conversion aborted after 1 error
+1
View File
@@ -0,0 +1 @@
-d 258
Binary file not shown.

After

Width:  |  Height:  |  Size: 71 B

+4 -2
View File
@@ -1,3 +1,5 @@
error: Palette size ('-s') must not exceed 4
error: 2bpp palettes can only contain 4 colors, not 5
error: Number of colors per palette must not exceed 4
error: Each palette can only contain up to 4 colors
In inline palette spec: "#111,#222,#333,#444,#555"
^
Conversion aborted after 2 errors