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 435683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T20:24:03+00:00 2026-05-12T20:24:03+00:00

I am seeking a method to extract into separate images the Luma (Y), Cb

  • 0

I am seeking a method to extract into separate images the Luma (Y), Cb (blue component), Cr (red component), channels of the JPEG images:

  • Seattle Police Department image #1
  • Seattle Police Department image #2
  • Seattle Police Department image #3

I would like results equivalent to this example from Wikipedia.

The output must be calculated directly from the JPEG Start-of-Scan (SOS) data and other data in the JPEG, rather than ‘back calculated’ from the RGB images output by a decompressor. The purpose of this task is to produce images which represent the ‘raw data’ as closely as possible.

Are there existing tools which can accomplish this? I am considering throwing together something using Python, PyImage, etc. but I am surprised my search for open source or free tools has come up empty. I am aware there are many libraries which could help, although I am open to becoming aware of more libraries.

For this question, the correct answer would be a tool chain of free and/or open-source tools which can do the job. Tools with source are preferred. These tools can run on any platform, but Linux or Win32 would be immediately useful.

Answer inspired by codelogic

Given the libjpeg implementation, change djpeg.c and wrppm.c.

wrppm.c:

189:    case JCS_RGB:
190: +  case JCS_YCbCr:
191:    /* emit header for raw PPM format */

djpeg.c

560:   case FMT_PPM:
561: +   cinfo.quantize_colors = 0;
562: +   cinfo.out_color_space = JCS_YCbCr;

Obviously, this is quick hack, because I have a private copy where PPM output is always forced to YCbCr, but it works and I thank you, codelogic, for your Stone Code Logic.

  • 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-12T20:24:04+00:00Added an answer on May 12, 2026 at 8:24 pm

    As suggested your best bet would be to use libjpeg directly. Specifically, you might be able to set jpeg_decompress_struct‘s out_color_space member to be JCS_YCbCr instead of JCS_RGB and read the scanlines as usual. Here’s some sample code (GPL).

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

Sidebar

Related Questions

Seeking a method to: Take whitespace separated tokens in a String; return a suggested
I'm seeking a method that tells me whether my code is running inside an
I am not familiar with this website but I am desperately seeking help with
Seeking suggestions from PHP architects! I'm not terribly familiar with PHP but have taken
I am using a CMS that hosts multiple websites simultaneously and I am seeking
Seeking your help to get off .epub(s) sea in iPhone world... I am trying
For a very large site such as a Social Network (say Facebook), which method
I have the following Action Method: [HandleFtmsError] public ActionResult PerformanceChart(ChartViewModel chart) { var x
I know LINQ has a SequenceEquals method. This method makes sure each item value
I need to use the showModalDialog method to display a message to a user,

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.