SaveResolutionCount example for Delphi

var
   i: Integer;
   RasterIO: LEADRasterIO;
begin
   RasterIO := CreateComObject (CLASS_LEADRasterIO) as ILEADRasterIO;
   //assume that our bitmap is 800 x 600
   //save 3 resolutions
   RasterIO.SaveResolutionCount:= 3;

   RasterIO.SaveResolutionWidth [0]:= 800;
   RasterIO.SaveResolutionHeight [0]:= 600;
   RasterIO.SaveResolutionWidth[1]:= 400;
   RasterIO.SaveResolutionHeight[1]:= 300;
   RasterIO.SaveResolutionWidth[2]:= 200;
   RasterIO.SaveResolutionHeight[2]:= 150;

   //get the SaveResolution info
   ShowMessage ('SaveResolutionCount = ' + IntToStr(RasterIO.SaveResolutionCount));

   for i:= 0 to RasterIO.SaveResolutionCount- 1 do
   begin
       ShowMessage( 'SaveResolution(' + IntToStr(i) + ') = ' +
       IntToStr(Trunc(RasterIO.SaveResolutionWidth[i])) + ' x ' +
       IntToStr(Trunc(RasterIO.SaveResolutionHeight[i])));
   end;
end;