File to C style array converter
v:
Select a file:
File info
This section contains basic information on the uploaded file.
If it is an image, the size in pixel and a preview will be shown
Name
Size
Type
Last modified
Preview
The grey border around the image is for visibility only.
If it is shorter than 32px, or taller than 100px, it will be resized. Again, for visibility reasons.
Conversion settings
Code format
The array declaration will contain bytes in this format.
So if you have choosen "Hex (0x00)", it will give you this output:
static const unsigned char awesomeimage[] = { 0x00, 0xff, 0xff };
Hex (0x00)
Hex (\x00)
Decimal (000)
Binary (B00000000)
Treat as binary
This tells the converter to treat the current file as a binary, eventhough it is an image.
Every image conversion option will be disabled.
Also will exclude the widht and height info from the output.
Palette mod
This controls the output palette format of the image
For more info on this, please see
the WikiPedia aricle on color depth
32 bit RGBA (4bytes/pixel)
32-bit BGRA (4bytes/pixel)
24bit RGB (3bytes/pixel)
16bit RRRRRGGGGGGBBBBB (2byte/pixel)
16bit BBBBBGGGGGGRRRRR (2byte/pixel)
15bit RRRRRGGGGGBBBBBA (2byte/pixel)
8bit RRRGGGBB (1byte/pixel)
8bit grayscale (1byte/pixel)
1bit line art (1bit/pixel)
Resize
Fill only one of the size boxes to resize the image maintaining the original spect ratio.
Keep both empty, if you do not want to change the size.
x
(Fill only one to maintain aspect ratio)
Multi line
The bytes in the array will be split into multiple lines, roughly matching the aspect ratio of the image.
Unselect this to have all the bytes in a single row.
Optimize for column read
For applications where you need to display the image one 8bit column at a time - as opposed to the normal mode where you plot the image by row.
Row read optimized:
Column read optimized:
This is only available in 1bit mode!
Separate bytes of pixels
If ticked every byte of every pixel will be added to the array separately. Otherwise one item in the array will represent all bytes of one pixel.
Endianness
Little-endian
Big-endian
static
const
unsigned
Data type
byte
char
int
word
short
long
int8_t
int16_t
int32_t
int64_t
uint8_t
uint16_t
uint32_t
uint64_t
PROGMEM
These control the signature generated.
Please note, not all of them make sense in all languages!
...
Result