danielgtaylor / jpeg-archive

Utilities for archiving JPEGs for long term storage.
1.17k stars 121 forks source link

Don't perform grayscale with ssim and only load inputs once for jpeg-compare #87

Closed rikonor closed 6 years ago

rikonor commented 6 years ago

This PR is due to https://github.com/danielgtaylor/jpeg-archive/issues/86.

I believe the grayscale conversion is already done in decodeJpeg, and therefore the call to grayscale is redundant. I'm not sure this is the correct way to fix it, but it does seem to make the SSIM scores match (oddly enough, not perfectly: 0.999333 != 0.999312).

rikonor commented 6 years ago

I extended this PR to make jpeg-compare not try to load the inputs multiple times as well (similar to https://github.com/danielgtaylor/jpeg-archive/pull/85) because the fact that it was reading the inputs multiple times made it impossible to work with named pipes.

lfos commented 6 years ago

Merged, thanks!