[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Graphics' (#lcl)

# TGraphic.LoadFromMimeStream

Loads the from the specified stream for the given MIME type.

## Declaration

Source position: graphics.pp line 835

`public procedure TGraphic.LoadFromMimeStream(`
`AStream: TStream;`
`const AMimeType: string`
`); virtual;`

## Arguments

`AStream` |  | Stream with the content loaded in the method.
`AMimeType` |  | MIME type representing the stream content.

## Description

LoadFromMimeStream reads graphic data from a stream for the given MIME type. LoadFromMimeStream compares the value in AMimeType to the value in the MimeType property. When the values are the same, the LoadFromStream method is called the load the image data for the graphic from the stream in AStream.

In TGraphic, an EInvalidGraphic is raised when AMimeType contains any value other than an empty string ('').

Remark: | Must be overridden in a descendent class to provide support for a MIME type representing a specific image format.