Twinside / Juicy.Pixels

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

JPEG: Don't use `error` on invalid inputs; `fail` the parser #208

Closed nh2 closed 2 years ago

nh2 commented 2 years ago

This fixes x :: JpgImage <- get failing in cases where it shouldn't (e.g. reading the dimensions from the header of an otherwise corrupt JPEG).

Also, user input should not trigger error.

Twinside commented 2 years ago

Thanks

nh2 commented 2 years ago

Thanks for the quick response!