BGRA to JPEG Converter
Convert raw BGRA pixel data files to JPEG images. Specify dimensions, adjust quality, and download the result instantly in your browser.
Drop your .bgra / .raw file here or click to browse
Accepts any raw BGRA binary file
Expected file size: —
Processing…
About
Raw BGRA pixel data is a headerless binary format where each pixel occupies 4 bytes in Blue - Green - Red - Alpha order. Without embedded metadata, the file carries zero information about image dimensions or color space. Feed the wrong width to a naive reader and every scanline shifts, producing diagonal garbage. This tool performs real byte-level channel remapping (B ↔ R) and rasterizes the corrected RGBA buffer onto a canvas for native JPEG compression. You must supply the correct width and height because the converter validates that filesize ≥ W × H × 4 bytes before proceeding.
JPEG quality maps to the lossy DCT quantization tables inside the browser's encoder. A quality of 0.92 is visually lossless for photographic content. Below 0.50, chroma sub-sampling artifacts become visible on sharp edges. Note: JPEG discards the alpha channel entirely. If your source relies on transparency, the alpha data will be composited against a white background before encoding.
Formulas
The raw BGRA file size must satisfy the dimensional constraint before conversion can proceed:
where W = image width in pixels, H = image height in pixels, and 4 = bytes per pixel (BGRA).
Channel remapping for each pixel index i (offset = i × 4):
In byte terms at offset o: swap byte[0] (Blue) with byte[2] (Red). Bytes at positions [1] and [3] remain unchanged.
Alpha compositing against white before JPEG encoding (since JPEG lacks alpha):
where Csrc is the source channel value (0-255), A is the alpha byte, and the background is white (255).
Reference Data
| Property | BGRA (Raw) | JPEG (Output) |
|---|---|---|
| Header | None (headerless) | SOI + APP0/EXIF markers |
| Channel Order | B, G, R, A | Y, Cb, Cr (YCbCr) |
| Bits per Pixel | 32 | Variable (lossy) |
| Bytes per Pixel | 4 | N/A (compressed) |
| Alpha Support | Yes (byte 3) | No |
| Compression | None | DCT-based lossy |
| Typical File Size (1920×1080) | 8,294,400 bytes (exact) | 100-500 KB |
| Endianness | Little-endian (x86 native) | Big-endian (JFIF) |
| Max Dimensions (Browser) | Limited by RAM | 16384 × 16384 px (canvas limit) |
| Color Depth | 8 bit/channel | 8 bit/channel |
| Use Case | Frame buffers, GPU textures, DirectX | Web, photography, sharing |
| Quality 1.0 | - | ~95% original fidelity |
| Quality 0.8 | - | ~85% fidelity, ~60% size reduction |
| Quality 0.5 | - | ~70% fidelity, visible artifacts |
| Quality 0.1 | - | Heavy blocking, chroma smear |
| MIME Type | application/octet-stream | image/jpeg |
| Common Extensions | .bgra, .raw, .data, .bin | .jpg, .jpeg |