xxd -i logo.png

Category: Administration

xxd -i logo.png

Export a file as a C array

The -i flag formats the file as an initialized C array named after the input, ready to embed in source code. This is the standard way to bundle small assets like icons into a binary. Add a length variable with -i plus -l to cap the size.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.