Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 807329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:23:05+00:00 2026-05-15T00:23:05+00:00

I am now trying to understand how JPEG encoding works and everything seems fine

  • 0

I am now trying to understand how JPEG encoding works and everything seems fine except the color transformation part.

Before attempting to do a DCT in JPEG algorithm, the image is transformed into YCbCr color space. To me this essentially means that we just (comparing to initial RGB image) take a chunk of color information and dispose it while applying the RGB -> YCbCr transformation.

So, our encoding steps look generally like RGB -> YCbCr -> DCT -> Huffman. The decoding means inversing this process.

And my question is – why does the image (for example, created and exported to JPEG) remain the same in terms of color, although we have to make inverse YCbCr -> RGB transform. Where does the disposed part of color information comes from or how is it handled?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T00:23:05+00:00Added an answer on May 15, 2026 at 12:23 am

    To me this essentially means that we
    just (comparing to initial RGB image)
    take a chunk of color information and
    dispose it while applying the RGB ->
    YCbCr transformation.

    No information gets disposed by the transformation itself. The transformation is reversible in a mathematical sense. E.g. if you convert a color to YCbCr and transform the result back to RGB you get the same color back. In a perfect world after all.

    In practice there is a loss of information. Assume that you start with three bytes in RGB. If you convert to YCbCr you get three values of which two, namely Cb and Cr don’t fit into 8 bit anymore. Speaking technically the two representations RGB and YUV have a different gamut (http://en.wikipedia.org/wiki/Gamut)

    This information loss is fortunately rarely visible. Important side-node: This gamut thing is an unwanted side-effect and has nothing to do with the choice of using YCbCr at the first place.

    The point of using YCbCr is, that the data stored in Y is the most important. It is the brightness, or the gray-scale value. The data in Cb and Cr are the color information with brightness subtracted so to say.

    Now our eyes aren’t that good at picking subtle differences in color, but they are sensitive to shades of intensity. To make use of this in jpeg only a low resolution image of Cb and Cr are stored and Y is stored at full resolution. There are different ways to do this with the most common one to leave out every other pixel from Cb and Cr in x and y. That reduces the space requirements by a factor of four for Cb and Cr.

    Where does the disposed part of color
    information comes from or how is it
    handled

    It does not magically come back. The information is lost forever. However, since the information wasn’t that important to begin with we don’t see much artifacts.

    In jpeg, the left out pixels of Cb and Cr panes are approximated by upscaling the Cb and Cr plane again. Some decoders just replicate the missing pixels by picking a neigbour, other do linear interpolation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right now I'm trying to understand how Flex works with Java (Flex -> BlazeDS
I am now trying to understand some code and I have found a pattern,
As a follow up tho this and this other question, I am now trying
I'm using Axis to model a sample WebService. What I'm doing now is trying
I'm really confused by all that caching stuff. I'm trying to setup mod_expires to
I am having difficulties when trying to insert files into a SQL Server database.
Following on from the excellent answer to my previous question: Linq Entity Framework generic
I have implemented custom draw for an CTreeCtrl in my MFC Smart Device program.
i have a c# dll which is written to act as a wrapper to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.