Skip to content

Commit

Permalink
Disable sRGB hash optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
lilith committed May 18, 2020
1 parent 733d0fa commit 80d6564
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions imageflow_core/src/codecs/mozjpeg_decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,17 +494,16 @@ impl MzDec{
gamma: self.gamma
};

if let Some(profile) = self.color_profile.as_deref_mut(){
let hash = imageflow_helpers::hashing::hash_64(&profile[80..]);

if hash == 250807001850340861 {
info.source = ColorProfileSource::sRGB;
}else {
info.profile_buffer = profile.as_mut_ptr();
info.buffer_length = profile.len();
info.source = ColorProfileSource::ICCP;
}

if let Some(profile) = self.color_profile.as_deref_mut() {
//let hash = imageflow_helpers::hashing::hash_64(&profile[80..]);

// if hash == 250807001850340861 {
// info.source = ColorProfileSource::sRGB;
// }else {
info.profile_buffer = profile.as_mut_ptr();
info.buffer_length = profile.len();
info.source = ColorProfileSource::ICCP;
//}
}
info
}
Expand Down

0 comments on commit 80d6564

Please sign in to comment.