ImageEn, unit iexBitmaps

TIEBitmap.RestoreState

TIEBitmap.RestoreState


Declaration


procedure RestoreState();


Description


Pops the top state on the states stack, restoring the TIEBitmap to that state.

See SaveState.


Example


// Merges alpha channel to save image as BMP, and restore it
ImageEnView1.IO.LoadFromFile('input.png');
ImageEnView1.IEBitmap.SaveState();
ImageEnView1.RemoveAlphaChannel(true);
ImageEnView1.IO.SaveToFile('output.bmp');
ImageEnView1.IEBitmap.RestoreState();

// Same as above, but with ImageEnView1.LegacyBitmap = False
ImageEnView1.IO.LoadFromFile('input.png');
ImageEnView1.LockUpdate();
ImageEnView1.IEBitmap.SaveState();
ImageEnView1.RemoveAlphaChannel(true);
ImageEnView1.IO.SaveToFile('output.bmp');
ImageEnView1.IEBitmap.RestoreState();
ImageEnView1.UnlockUpdate();