InvalidImageContentException Class

The exception thrown when the data of a recognized format is malformed, inconsistent, or truncated.

public class InvalidImageContentException : ImageException

Remarks

Malformed data is never reported as a clean end of input or as a successfully truncated image.

Inheritance
ImageException InvalidImageContentException

Constructors

NameDescription
InvalidImageContentException()Initializes a new instance of the InvalidImageContentException class.
InvalidImageContentException(string?)Initializes a new instance of the InvalidImageContentException class with a message.
InvalidImageContentException(string?, ImageFormat, Exception?)Initializes a new instance of the InvalidImageContentException class for a specific format.
InvalidImageContentException(string?, Exception?)Initializes a new instance of the InvalidImageContentException class with a message and an inner exception.

InvalidImageContentException overloads

InvalidImageContentException()

InvalidImageContentException.cs

Initializes a new instance of the InvalidImageContentException class.

public InvalidImageContentException()

InvalidImageContentException(string?)

InvalidImageContentException.cs

Initializes a new instance of the InvalidImageContentException class with a message.

public InvalidImageContentException(string? message)
Parameters
message string?
The error message.

InvalidImageContentException(string?, ImageFormat, Exception?)

InvalidImageContentException.cs

Initializes a new instance of the InvalidImageContentException class for a specific format.

public InvalidImageContentException(string? message, ImageFormat format, Exception? innerException = null)
Parameters
message string?
The error message.
format ImageFormat
The format whose data is invalid.
innerException Exception?
The exception that caused this exception.

InvalidImageContentException(string?, Exception?)

InvalidImageContentException.cs

Initializes a new instance of the InvalidImageContentException class with a message and an inner exception.

public InvalidImageContentException(string? message, Exception? innerException)
Parameters
message string?
The error message.
innerException Exception?
The exception that caused this exception.

Properties

NameDescription
FormatGets the format whose data is invalid, or ImageFormat.Unknown if not specified.

Gets the format whose data is invalid, or ImageFormat.Unknown if not specified.

public ImageFormat Format { get; }

Property value

ImageFormat