The bytes_per_plane value was using the default stride and not the passed custom stride. For multi component images with interleave mode none this caused the second plane to overwrite part of the first decoded plane, etc.
Also added a check to verify the passed stride argument, it should minimal be the default stride.
The bytes_per_plane value was using the default stride and not the passed custom stride. For multi component images with interleave mode none this caused the second plane to overwrite part of the first decoded plane, etc.
Also added a check to verify the passed stride argument, it should minimal be the default stride.