anchor.diff:  
   procedure TATImageBox.UpdateImagePosition(AResetPosition: Boolean = False);
   var
  -  AKeepPosition: Boolean;
  -  AWidth, AHeight,
  -  ANewWidth, ANewHeight,
  -  ANewLeft, ANewTop,
  -  AScrollMaxX, AScrollMaxY: Integer;
  -  ARatio, AImageRatio,
  -  ACenterRatioX, ACenterRatioY: Double;
  +  bKeepPosition: Boolean;
  +  CliWidth, CliHeight,
  +  NewWidth, NewHeight, NewLeft, NewTop,
  +  ScrollMaxX, ScrollMaxY: Integer;
  +  NRatio, NImageRatio, CenterRatioX, CenterRatioY: Double;
     NScrollbarSize: integer;
   begin
  -  AKeepPosition:= FImageKeepPosition and (not AResetPosition);
  +  bKeepPosition:= FImageKeepPosition and not AResetPosition;
   
     if FImageFit then
       NScrollbarSize:= 0
  
positive.code:   end;
  
    //Restore saved center position
    if AKeepPosition then
    begin
      if ANewLeft = 0 then
      begin
        AScrollMaxX:= Max(ANewWidth - AWidth, 0);
        HorzScrollBar.Position:=
          Min(AScrollMaxX, Trunc(ACenterRatioX * ANewWidth) - AWidth div 2);
      end
      else
        HorzScrollBar.Position:= 0;
  
      if ANewTop = 0 then
      begin
        AScrollMaxY:= Max(ANewHeight - AHeight, 0);
        VertScrollBar.Position:=
          Min(AScrollMaxY, Trunc(ACenterRatioY * ANewHeight) - AHeight div 2);
      end
      else
        VertScrollBar.Position:= 0;
  
negative.code: 
    VertScrollBar.Visible:= not FImageFit;
    HorzScrollBar.Visible:= not FImageFit;
    CliWidth:= Width-NScrollbarSize;
    CliHeight:= Height-NScrollbarSize;
  
    //Save center position, need to restore it later
    CenterRatioX:= 0;
    CenterRatioY:= 0;
  
    if FImage.Width > 0 then
    begin
      if FImage.Left >= 0 then
        CenterRatioX:= (CliWidth div 2 - FImage.Left) / FImage.Width
      else
        CenterRatioX:= (CliWidth div 2 + HorzScrollBar.Position) / FImage.Width;
    end;
  
    if FImage.Height > 0 then
    begin
      if FImage.Top >= 0 then
        CenterRatioY:= (CliHeight div 2 - FImage.Top) / FImage.Height
      else
        CenterRatioY:= (CliHeight div 2 + VertScrollBar.Position) / FImage.Height;
    end;
  
    //Set controls params
    if not bKeepPosition then
    begin
      HorzScrollBar.Position:= 0;
      VertScrollBar.Position:= 0;
  