Click here to Skip to main content
12,694,121 members (34,206 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB VB.NET
How Algorithm Used In JPEG Compression For Set Colors Darker and Subtract RGB Codes
My Program %100 Need Correct and Original RGB Color Codes Please Help Me
My Last Answer Can't Help Me
I Want a Math or Drawing Function to Restore My Colors
Very Thanks Mr.Deepak Jena For Last Answer
Posted 7-Oct-12 6:17am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Sorry, but you can't get 100% correct and original color codes if you use JPG formats - it is a lossy compression technique which uses pixel similarity to discard information without significantly affecting image quality. All JPG processing converts from RGB to YCbCr as the first stage in the compression, and it is not possible to reverse the conversion and restore the original image, despite what TV crime dramas may tell you!

If you want to retain 100% original color information then do not use a lossy compression file format - use BMP or similar which does no compression at all, and (if necessary) use a non-lossy compression technique such as ZIP afterwards.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 7 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100