JPEG to RGB Converter

Turn a JPEG photo into headerless raw RGB samples for image-processing code, in your browser.

or drop files here

JP

JPEG Format

JPEG image

The lossy photo format named for the Joint Photographic Experts Group, built for photographs.

  • 8 bits per color channel
  • No alpha channel
  • image/jpeg
RG

RGB Format

Raw RGB image data

A raw sample stream with no header. ImageMagick's RGB coder needs the size and depth supplied to read it.

  • No dimensions stored
  • Different from the SGI format

How to convert JPEG to RGB

Follow these steps to convert JPEG to RGB online.

    1

    Choose your JPEG file, or several at once.

    2

    Wait while the converter turns each file into RGB.

    3

    Download each new RGB file. Your original file isn't changed.

What to know before converting JPEG to RGB

  • The RGB file is headerless raw samples.
  • You must keep the width, height and depth yourself.
  • It is not the SGI image format.
  • Choose several JPEGs and each gives its own RGB file.

About JPEG and RGB files

What is a JPEG file?

A JPEG is the lossy photo format of the Joint Photographic Experts Group. Cameras and scanners commonly produce it, and browsers display it everywhere. Each channel gets 8 bits, so there is no alpha, and layers cannot be stored. IANA registers image/jpeg, and .jpg and .jpeg name one format.

Programs that open JPEG files

  • Web: browsers render them inline.
  • Mac: Preview displays a JPEG.
  • Windows: Windows Photos displays it too.
  • Windows, Mac and Linux: GIMP edits JPEG files.

JPEG and RGB compared

An .rgb ending can mean two different things. ImageMagick has a coder it calls Irix RGB for SGI images, and a separate RGB coder for raw sample streams. Raw streams store no dimensions, so a reader must be given the size and depth.

The browser decodes your JPEG, and ImageMagick's raw RGB coder writes the samples from those pixels. Write down the picture's width and height before you convert. The file will not tell you later, and a wrong guess shows up as a striped or sheared image. Reading it back takes those same numbers, in ImageMagick as a -size and -depth setting before the file name.

Other ways to convert JPEG to RGB

  • ImageMagick: run magick photo.jpeg -depth 8 rgb:photo.rgb, then read it back with magick -size 640x480 -depth 8 rgb:photo.rgb photo.png, using the real width and height. ImageMagick's format list describes RGB as raw sample streams that need the size and depth parameters.
  • Pillow: open the JPEG, write image.tobytes() to a binary file and save image.size separately.
  • GIMP: open the JPEG and export as Raw image data. Planar configuration offers Contiguous or Planar, which writes the channels as separate planes.

Problems with JPEG files

  • Quality scales differ: setting 85 in GIMP is not guaranteed to match 85 in another program, so judge by eye.
  • No alpha: JPEG has no way to mark pixels transparent, so cutouts need a different format.
  • Lossy compression: the decoded pixels carry the JPEG's blocks and banding into any raw copy.
  • Single flat layer: layered artwork is flattened in a JPEG, so keep the source project.

Frequently Asked Questions

Everything you need to know about our converter

Is this the RGB color mode?

How do I open the RGB file afterward?

Is it an SGI image?

Where do I find the image size?

Why does my import look striped?

Is the color profile or EXIF data kept?

Does the RGB file hold 8 bits per sample?

Is the raw RGB file produced on a server?