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 5: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 OriginalGriff 392
1 CPallini 365
2 Sergey Alexandrovich Kryukov 348
3 BillWoodruff 264
4 George Jonsson 255
0 OriginalGriff 5,095
1 CPallini 4,285
2 Sergey Alexandrovich Kryukov 3,767
3 George Jonsson 2,941
4 Gihan Liyanage 2,386


Advertise | Privacy | Mobile
Web03 | 2.8.140916.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