Reduces any jpg to a 10 x 10 array of RGB values.
npm install
Generate array data:
> node app/index.js JPG-PATH
Where JPG-PATH is app/cat.jpg
Outputs:
> Image reducer
> Processing app/cat.jpg
> 000-000-000,000-000-000,034-029-023,053-049-04...
Note: add --snake
to snake the rows, inverting every other line of bytes.
Snaked output will display a hint in the console.
Generate preview for visual checking
> node app/index.js JPG-PATH app/cat.jpg --preview
Outputs:
Image reducer
Processing app/cat.jpg
[ ] [ ] [034-029-023] [053-049-040] [ ] [ ] [029-027-023] [055-049-039] [ ] [ ]
[ ] [ ] [056-048-038] [124-113-096] [011-010-008] [ ] [118-109-095] [102-094-081] [ ] [ ]
[ ] [ ] [074-067-058] [131-120-103] [083-073-059] [064-055-047] [143-129-109] [103-091-077] [001-001-001] [ ]
[ ] [ ] [057-049-039] [112-099-081] [055-048-038] [035-030-024] [128-115-095] [100-088-072] [001-001-001] [ ]
[ ] [ ] [082-074-063] [108-096-079] [082-074-061] [087-078-063] [119-107-089] [110-100-087] [ ] [ ]
[ ] [001-001-001] [083-075-065] [085-075-060] [102-088-066] [122-107-084] [119-106-084] [102-093-080] [009-008-006] [ ]
[ ] [ ] [067-061-053] [058-051-042] [081-072-058] [108-095-076] [080-071-061] [104-095-082] [014-013-011] [ ]
[ ] [004-004-004] [060-054-047] [103-094-080] [150-140-123] [142-134-119] [131-122-105] [114-105-092] [020-018-017] [ ]
[ ] [002-002-002] [058-052-046] [098-091-081] [093-087-077] [123-117-105] [095-088-077] [089-081-072] [051-046-042] [003-003-003]
[ ] [003-003-003] [059-053-047] [059-052-045] [060-053-044] [062-055-045] [056-050-041] [089-080-071] [080-072-064] [006-005-004]