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

# TRasterImage.SaveStreamNeeded

Ensures that the save stream for the shared image is allocated.

## Declaration

Source position: graphics.pp line 1290

`protected procedure TRasterImage.SaveStreamNeeded;`

## Description

SaveStreamNeeded is a procedure used to ensure that the internal save stream for the shared image is allocated.

Raises an EInvalidGraphicOperation exception if BeginUpdate (without a matching EndUpdate) is active in the class instance.

No actions a performed in the method when a TMemoryStream has already been assigned as the save stream for the internal TSharedRasterImage instance.

SaveStreamNeeded is called from methods like SaveToStream and WriteData, and occurs before operations which read or write to the save stream.