Twinside / Juicy.Pixels

Haskell library to load & save pictures
BSD 3-Clause "New" or "Revised" License
238 stars 57 forks source link

Fix JPEG parsing regression #216

Closed nh2 closed 1 year ago

nh2 commented 1 year ago

This should fix the regression from https://github.com/Twinside/Juicy.Pixels/pull/215#issuecomment-1339068368.

I made a couple mistakes there.

I improved the equivalence test (which was not correct), and further confirmed it against the old implementation in my separate branch jpeg-parsing-fixes-2-investigation with commit https://github.com/Twinside/Juicy.Pixels/commit/054d76bac8b92c30210057b9d785cb33fa821f2c.


I also want to point out (beyond issue #214) that the test suite as it is now is totally insufficient, because it does not catch even the most severe errors like JPEGs not parsing correctly at all. That makes it difficult to contribute performance fixes like #215 with confidence.