anchor.diff:        Images.Add(Image);
       end;
       PaintImage(Horiz, Verti, ColNum, RefImage, zPage);
  +  end
  +  else if fpgImages.GetImage(ImgFileName) <> nil then
  +  begin
  +    RefImage := ImageNames.IndexOf(IntToStr(Scale) + ImgFileName);
  +    if RefImage = -1 then
  +    begin
  +      { This returns a refence to an existing image }
  +      TempImage := fpgImages.GetImage(ImgFileName);
  +      Scale := 1;
  +      RefImage := ImageNames.Add(IntToStr(Scale) + ImgFileName);
  +      { Clone the image because we don't want to free fpGUI registered images,
  +        because they could be used by other widgets or areas of the application. }
  +      Image := TempImage.ImageFromSource;
  +      Images.Add(Image);
  +    end;
  +    PaintImage(Horiz, Verti, ColNum, RefImage, zPage);
  +  end
  +  else
  +    { TODO: localize this message }
  +    ShowMessage('Image ' + ImgFileName + ' is missing');
  +end;
  +
  +procedure T_Report.ImageFooter(Horiz, Verti: single; ImgFileName: string; ColNum, Scale: integer);
  +var
  +  RefImage: integer;
  +  Image: TfpgImage;
  +begin
  +  Horiz := Dim2Pixels(Horiz);
  +  Verti := Dim2Pixels(Verti);
  +  if FileExists(ImgFileName) then
  +  begin
  +    RefImage := ImageNames.IndexOf(IntToStr(Scale) + ImgFileName);
  +    if RefImage = -1 then
  +    begin
  +      if Copy(ImgFileName, Succ(Pos('.', ImgFileName)), 3) = 'bmp' then
  +      begin
  +        Image := LoadImage_BMP(ImgFileName);
  +        Scale := 1;
  +      end;
  +      if (Copy(ImgFileName, Succ(Pos('.', ImgFileName)), 3) = 'jpg') or (Copy(ImgFileName, Succ(Pos('.', ImgFileName)), 4) = 'jpeg') then
  +        Image := LoadImage_JPG(ImgFileName, Scale);
  +      RefImage := ImageNames.Add(IntToStr(Scale) + ImgFileName);
  +      Images.Add(Image);
  +    end;
  +    PaintImage(Horiz, Verti, ColNum, RefImage, zFooter);
     end
     else if fpgImages.GetImage(ImgFileName) <> nil then
     begin
  
positive.code: procedure T_Report.ImagePage(Horiz, Verti: single; ImgFileName: string; ColNum, Scale: integer);
  var
    RefImage: integer;
    Image: TfpgImage;
  begin
    Horiz := Dim2Pixels(Horiz);
    Verti := Dim2Pixels(Verti);
  
negative.code:     ShowMessage('Image ' + ImgFileName + ' is missing');
  end;
  
  end.
  
  