imdecode, imread mismatch

asked 2015-02-04 13:53:40 -0600

jpmccaffery gravatar image

updated 2015-02-04 13:59:37 -0600

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 iden

edit retag flag offensive close merge delete

Comments

@berak do you have any comment about this?

sturkmen gravatar imagesturkmen ( 2018-02-01 02:36:37 -0600 )edit

@sturkmen, not really, but let me look it up.

(funny to see, how this question about corrrupted data ends ... ;)

berak gravatar imageberak ( 2018-02-01 02:41:44 -0600 )edit

i will delete dublicate question. it is also strange being not shown on @jpmccaffery 's profile

sturkmen gravatar imagesturkmen ( 2018-02-01 02:49:37 -0600 )edit

let me investigate this

sturkmen gravatar imagesturkmen ( 2020-09-27 09:01:47 -0600 )edit