1. Defining Raw Interleaved Binary Data Streams
In computer graphics, a raw image file (.raw or .bin) consists of sequential uncompressed channel byte arrays without any headers, color profile tags, dimensions, or compression layers. Standard image containers like PNG and JPEG require CPU cycles to parse metadata headers, extract palettes, and run Huffman or Deflate decoders. By contrast, raw pixel data maps directly to a graphics card's texture buffer or an embedded microcontroller's frame buffer, allowing instant rendering with zero file format decoding overhead.
2. Custom Channel Sequences: RGB, RGBA, BGR, and BGRA
Depending on the target GPU architecture or display controller, the sequence in which color channels are read varies:
- RGB: The standard format for legacy 24-bit displays, storing 3 bytes per pixel (Red, Green, Blue).
- RGBA: Used in modern graphic overlays and UI engines, packaging 4 bytes per pixel including the Alpha channel transparency.
- BGR/BGRA: The native formats for Windows device contexts, OpenCV structures, and specific GPU hardware layouts.
- Grayscale: Stores a single luminance value (1 byte per pixel), ideal for single-channel displacement maps, depth maps, or heightmaps.
3. Bit Depth Upscaling and Endianness (8-bit vs. 16-bit)
For 3D game engines, heightmaps, and terrain generators, 8-bit precision (256 increments) often causes noticeable "stepping" or banding artifacts. Developers use **16-bit color depths** (65,536 increments) to render smooth displacement curves.
Our converter upscales 8-bit canvas channels to 16-bit using precision mapping: `Val16 = Val8 * 257`, matching the range exactly. When exporting 16-bit values, byte ordering (endianness) becomes critical: **Little Endian (LSB)** orders bytes as least significant first (Intel/AMD architectures), while **Big Endian (MSB)** places the most significant byte first (network standards and legacy processors).
4. Private and Fast Client-Side Compiling
RAW converters typically run on servers due to the binary file formatting requirements. Our tool processes raw pixel conversions locally using HTML5 TypedArrays (`Uint8Array`, `Uint16Array`, `DataView`) in your browser. Since no buffers are sent over the network, conversions occur at high speeds and remain 100% private.
Quick RAW Conversion FAQ
Q: Does raw data contain image width and height?
No, raw files contain only the raw pixel values. When loading the file into Photoshop or raw viewers, you must manually specify the exact width, height, and color channels to render it correctly.
Q: Why are 16-bit options disabled on some computers?
All modern browsers support TypedArrays. Ensure your browser is up to date. Endianness selections are only active when 16-bit depth is selected.
Q: How is Grayscale calculated?
Grayscale values are computed using standard luminance factors: `Gray = 0.299 * Red + 0.587 * Green + 0.114 * Blue`, perfectly mapping standard color pixels to monochrome intensity.
Q: Is my data safe with this converter?
Yes, the conversion is performed locally in your browser. No files are ever sent to our servers.