Monochrome Bitmap Converter
Create or paste a black-and-white bitmap and convert its pixels into packed 1-bit bytes. Generate binary rows, hexadecimal bytes and ready-to-use C arrays for LCDs, OLEDs, icons, fonts and embedded graphics.
10110010₂ = 0xB2. If the width is not divisible by eight and
row padding is enabled, unused bits at the end of each row are filled with zero.
—
—
—
—
What Is a Monochrome Bitmap?
A monochrome bitmap stores each pixel using only one bit. Each pixel therefore has two possible states, commonly interpreted as black and white, OFF and ON, transparent and filled, or background and foreground.
One-bit graphics are widely used by embedded LCDs, OLED modules, status displays, icons, fonts and microcontroller user interfaces because they require very little memory.
How Much Memory Does a 1-Bit Bitmap Use?
The theoretical minimum storage is one bit per pixel:
Bitmap Bits =
Width × Height
Minimum Bytes =
ceil(Width × Height / 8)If every row is separately byte aligned, additional padding can be required when the width is not divisible by eight.
8×8 Monochrome Bitmap Example
8 pixels × 8 pixels
= 64 pixels
At 1 bit per pixel:
64 bits
64 / 8
= 8 bytesAn 8×8 monochrome icon therefore needs only eight bytes when each row maps to one byte.
Binary Pixels to Hexadecimal
Each group of eight bitmap bits can be represented as one hexadecimal byte.
Pixels:
10110010
Binary:
10110010₂
Hex:
0xB2
Decimal:
178MSB-First Bitmap Packing
In MSB-first packing, the leftmost pixel in an eight-pixel group is stored in bit 7.
Pixels:
1 0 1 1 0 0 1 0
Bits:
7 6 5 4 3 2 1 0
Byte:
10110010
= 0xB2LSB-First Bitmap Packing
Some displays and firmware libraries interpret the first pixel as the least significant bit instead.
Pixels:
1 0 1 1 0 0 1 0
LSB-first bit positions:
0 1 2 3 4 5 6 7
Packed byte:
01001101
= 0x4DBitmap Row Padding
Suppose a bitmap is 10 pixels wide. Ten pixels require more than one byte, so a byte-aligned row requires two bytes.
Width:
10 pixels
Required row bits:
10
Byte-aligned storage:
ceil(10 / 8)
= 2 bytes
Allocated:
16 bits
Padding:
6 bitsContinuous Bit Packing
Continuous packing places the next row immediately after the previous row’s last real pixel rather than starting every row at a new byte boundary.
This can reduce storage but makes row addressing less convenient. Many embedded graphics formats therefore prefer byte-aligned rows.
Black-Is-1 vs White-Is-1
Different display systems assign opposite meanings to bit value 1. In one system, 1 may illuminate or draw the pixel. In another, 1 may represent the background.
Black / ON = 1
Original:
10110010
Inverted polarity:
01001101Use the Pixel Polarity control when your target expects the opposite bit meaning.
Monochrome C Array Example
Bitmap bytes are often embedded directly into microcontroller firmware as a C array:
const unsigned char bitmap_data[] = {
0x7E,
0x81,
0xA5,
0x81,
0xBD,
0x99,
0x81,
0x7E
};Monochrome Bitmap Memory Examples
| Bitmap Size | Pixels | 1-Bit Minimum |
|---|---|---|
| 8 × 8 | 64 | 8 bytes |
| 16 × 16 | 256 | 32 bytes |
| 32 × 32 | 1024 | 128 bytes |
| 64 × 64 | 4096 | 512 bytes |
| 128 × 64 | 8192 | 1024 bytes |
Monochrome OLED Bitmap Data
Small OLED controllers frequently use one-bit display buffers, but their memory layout may be page-oriented rather than simple horizontal row-major bytes. Some controllers organize one byte as eight vertical pixels instead of eight horizontal pixels.
This converter produces horizontal packed bitmap data. If your display uses vertical page packing, a separate transpose or page-layout conversion is required.
Row-Major Bitmap Layout
The converter processes pixels from the top-left toward the right edge, then continues with the next row.
Processing order:
Row 0:
x = 0 → width - 1
Row 1:
x = 0 → width - 1
...
Row height - 11-Bit Bitmap vs Grayscale
A monochrome bitmap provides only two pixel states. Grayscale formats use multiple bits per pixel and can represent intermediate brightness levels.
For example, an 8-bit grayscale bitmap uses one full byte per pixel, which is eight times the theoretical storage of a 1-bit bitmap with the same dimensions.
Monochrome Bitmap Converter FAQs
How many bits does a monochrome pixel use?
How many bytes does an 8×8 bitmap need?
How do I convert binary bitmap pixels to hex?
What does MSB first mean for a bitmap?
What does LSB first mean?
Why does my bitmap appear inverted?
Why does my image look horizontally reversed inside each byte?
Why is my non-8-pixel-wide bitmap larger than expected?
Can I use the generated array on an OLED?
Does the converter accept a binary text bitmap?
Convert Monochrome Pixels to Binary and Hex
Build one-bit bitmap arrays for embedded displays, icons and fonts with configurable dimensions, row alignment, polarity and bit packing.