Ask Your Question

Revision history [back]

Bug or feature request?

I've found that when using imdecode and imread on identical Byte data I get different Mats returned. I am trying to decode corrupt JPEG files (essentially the first half or so of a JPEG file). imread handles the decoding gracefully filling in the missing data with a flat value. imdecode returns a Mat with 0 rows. Based on the documentation for imdecode I would expect their functionality to be identical.

My question is, is this a bug or a feature request? It's not strictly speaking a bug, but it would seem sensible to me to have imread read the Byte data and then hand that off to imdecode so that their functionality would be identical.