How about something like this?
procedure TForm1.RotateFrame(Index: Integer; Angle: double);
var
fn: string;
begin
fn := GetBackupFolder() + ImageEnMView1.MIO.Params[Index].Filename + '_' + IntToStr( Index ) + '.png';
ImageEnMView1.GetImageToFile( Index, fn );
ImageEnMView1.IEMBitmap.Rotate( Index, Angle, ierBicubic );
end;
function TForm1.CanUndo(Index: Integer): Boolean;
var
fn: string;
begin
fn := GetBackupFolder() + ImageEnMView1.MIO.Params[Index].Filename + '_' + IntToStr( Index ) + '.png';
Result := FileExists( fn );
end;
procedure TForm1.UndoFrame(Index: Integer);
var
fn: string;
begin
fn := GetBackupFolder() + ImageEnMView1.MIO.Params[Index].Filename + '_' + IntToStr( Index ) + '.png';
ImageEnMView1.SetImageFromFile( Index, fn );
DeleteFile( fn );
end;
Nigel
Xequte Software
www.imageen.com