Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: 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
good
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.
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 420
1 OriginalGriff 230
2 DamithSL 135
3 Dave Kreskowiak 110
4 Suvendu Shekhar Giri 110
0 OriginalGriff 7,740
1 DamithSL 5,644
2 Sergey Alexandrovich Kryukov 5,404
3 Maciej Los 5,011
4 Kornfeld Eliyahu Peter 4,539


Advertise | Privacy | Mobile
Web02 | 2.8.141223.1 | Last Updated 7 Oct 2012
Copyright © CodeProject, 1999-2014
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