You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.
Hello,
I noticed, that UnmanagedImage.Create method adjusts stride to make it multiple of four. It is the stride that System.Drawing.Bitmap needs.
framework/Sources/Accord.Imaging/AForge.Imaging/UnmanagedImage.cs
Lines 394 to 407 in 1b27ff9
Hovewer there is another method UnmanagedImage.Create
framework/Sources/Accord.Imaging/AForge.Imaging/UnmanagedImage.cs
Line 441 in 1b27ff9
that accepts stride and does not check it.
Than following code ends with exception, img.ToManagedImage is creating Bitmap image from invalid stride value.
Here System.Drawing.Bitmap constructor will have invalid stride value (not mulitple of four)
framework/Sources/Accord.Imaging/AForge.Imaging/UnmanagedImage.cs
Lines 521 to 533 in 1b27ff9
The text was updated successfully, but these errors were encountered: