Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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

1 solution

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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900