JPG to RGB Converter
Turn a JPG into raw red, green and blue samples, in your browser.
or drop files here
JPG Format
JPEG image
A lossy raster image format defined by the Joint Photographic Experts Group (ISO/IEC 10918-1), designed for photographs.
- Lossy compression
- 8 bits per color channel
- No alpha transparency
RGB Format
Raw RGB samples
An uncompressed stream of red, green and blue samples. The file has no header, so readers need the width, height and bit depth supplied.
- No header
- No compression
- Three channels per pixel
How to convert JPG to RGB
Follow these steps to convert JPG to RGB online.
Choose your JPG file, or several at once.
Wait while the converter turns each file into RGB.
Download each new RGB file. Your original file isn't changed.
Related Tools
JPG to BMP
Convert JPG images to BMP format
JPG to DDS
Convert JPG images to DDS format
JPG to DOCX
Convert JPG to DOCX format
JPG to GIF
Convert JPG images to GIF format
JPG to HDR
Convert JPG to HDR format
JPG to JFIF
Convert JPG to JFIF format
JPG to JPEG
Convert JPG images to JPEG format
JPG to JPG
Convert JPG files to JPG format
JPG to JXL
Convert JPG to JXL format
JPG to KTX2
Convert JPG to KTX2 format
JPG to PAM
Convert JPG to PAM format
JPG to PCX
Convert JPG to PCX format
JPG to PDF
Convert JPG images to PDF documents
JPG to PGM
Convert JPG to PGM format
JPG to PPM
Convert JPG to PPM format
JPG to SVG
Convert JPG to vector SVG
JPG to TGA
Convert JPG images to TGA format
JPG to TXT
Convert JPG to TXT format
JPG to WBMP
Convert JPG to WBMP format
JPG to XBM
Convert JPG to XBM format
JPEG to RGB
Convert JPEG to RGB format
PGM to RGB
Convert PGM to RGB format
PNG to RGB
Convert PNG to RGB format
PSD to RGB
Convert PSD to RGB format
Before converting JPG to RGB
- The result is raw samples with no header.
- You must supply width, height and bit depth to read it.
- The file is larger than the JPG.
- EXIF and color profile are dropped.
About JPG and RGB
What is a JPG file?
JPG is the everyday name for JPEG, the format of the Joint Photographic Experts Group. Its specification appeared as ITU-T T.81 (1992), then as ISO/IEC 10918-1 (1994). A JPG compresses a picture with a discrete cosine transform followed by Huffman coding, then adds a header that records its width and height. Every color channel gets 8 bits and nothing is kept for transparency. Both endings, .jpg and .jpeg, mean the same thing, and the registered media type is image/jpeg. Cameras and scanners write it by default.
Programs that open JPG files
- Windows, Mac and Linux: a JPG opens for editing in GIMP, and ImageMagick can read it.
- Web: Chrome and Firefox display a JPG without extra software.
- Mobile: Safari displays a JPG on a phone.
JPG and RGB compared
- Header: a JPG records its size and settings inside the file, whereas raw RGB records none.
- Compression: JPG is lossy, and raw samples are uncompressed.
- Samples: the raw output is red, green and blue values with no alpha, one byte each.
- Name clash: an .rgb ending may also mean an SGI image, which is laid out differently.
A raw RGB file is nothing but red, green and blue samples in a row. With no header, nothing in it tells a program the width, height or bit depth. The browser decodes the JPG and passes the pixels to ImageMagick, which writes them as raw samples. They pass through 8-bit RGBA first, so the metadata is left behind. You must tell any reader the width, height and format yourself.
Other ways to convert JPG to RGB
- ImageMagick:
magick photo.jpg -depth 8 RGB:samples.rgbwrites raw red, green and blue samples. The-depthoption sets the depth of raw formats such as RGB, whose depth the file does not record. - Pillow:
from PIL import Image; pixels=Image.open('photo.jpg').convert('RGB'); open('samples.rgb','wb').write(pixels.tobytes())saves the pixels as raw bytes. Pillow reads JPEG files, andtobytes()returns the unprocessed pixel data.
Problems with JPG files
- Blocky or smudged areas: raw RGB shows the flaws exactly as decoded and can't repair them.
- No transparency: a JPG has no alpha channel, so the samples have nothing to hold.
- Some old players stall: progressive JPGs can be rejected by aging photo frames, and re-saving without progressive scans fixes it.
- The quality scale varies: one editor's quality value is not another's, so identical settings can give different files.
Frequently Asked Questions
Everything you need to know about our converter
What kind of RGB file does this make?
How do I open the .rgb file?
Why does a viewer show noise or a sheared picture?
How do I convert JPG to RGB?
Is the .rgb file smaller than the JPG?
Does the .rgb carry the photo's metadata?
What if I need an SGI .rgb image?
What do I get if I choose several JPGs?
Browse All Tools
Browse by category instead of one giant mixed list.
Convert Tools
Convert image, audio, video, document, and data files directly in your browser.