InvalidImageContentException Class
The exception thrown when the data of a recognized format is malformed, inconsistent, or truncated.
public class InvalidImageContentException : ImageExceptionRemarks
Malformed data is never reported as a clean end of input or as a successfully truncated image.
- Inheritance
ImageExceptionInvalidImageContentException
Constructors
| Name | Description |
|---|---|
| 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.csInitializes a new instance of the InvalidImageContentException class.
public InvalidImageContentException()InvalidImageContentException(string?)
InvalidImageContentException.csInitializes a new instance of the InvalidImageContentException class with a message.
public InvalidImageContentException(string? message)Parameters
messagestring?- The error message.
InvalidImageContentException(string?, ImageFormat, Exception?)
InvalidImageContentException.csInitializes a new instance of the InvalidImageContentException class for a specific format.
public InvalidImageContentException(string? message, ImageFormat format, Exception? innerException = null)Parameters
messagestring?- The error message.
formatImageFormat- The format whose data is invalid.
innerExceptionException?- The exception that caused this exception.
InvalidImageContentException(string?, Exception?)
InvalidImageContentException.csInitializes a new instance of the InvalidImageContentException class with a message and an inner exception.
Parameters
messagestring?- The error message.
innerExceptionException?- The exception that caused this exception.
Properties
| Name | Description |
|---|---|
| Format | Gets 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; }