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
Image.Load overloads are marked as throwing UnknownImageFormatException however when the image content is incorrect, we throw ImageFormatException instead. We should consider defining, utilizing and documenting a new InvalidImageContentException for these cases. Alternatively we can just make the xmldocs to refer to ImageFormatException, as an easier solution, but having a separate ImageFormatException subclass seems more correct to me.
In Image.FromFile.cs and Image.FromBytes.cs we do not document the above exceptions at all.
ImageProcessingException is not documented on the API surface. I would suggest to add it to: Mutate, Clone and IImageProcessor<TPixel>.Execute, however I haven't analyzed the call hierarchy whether it is the correct thing to do.
Review our API if there are any other missing exception docs.
If we decide to indroduce InvalidImageContentException, that part should be probably done for RC1, since it is a breaking change.
Activity
[-]Document exceptions properly[/-][+]Document exceptions correctly[/+]antonfirsov commentedon Mar 13, 2020
Also noticed that many
Image.Loadoverloads and other public methods are not validating their input at all.