
IEN 10.3
Delphi11
64Bit
procedure TForm3.Button1Click(Sender: TObject);
begin
ImageEnView2.IO.Params.TIFF_Compression:=TIOTIFFCompression.ioTIFF_LZW;
ImageEnView2.IO.SaveToFiletiff(sFileName+'_LZW_.tif');
ShowMessage('Save OK!');
end;
procedure TForm3.Button2Click(Sender: TObject);
begin
ImageEnView2.IO.Params.TIFF_Compression:=TIOTIFFCompression.ioTIFF_Jpeg;
ImageEnView2.IO.SaveToFiletiff(sFileName+'_JPEG_.tif');
end;
procedure TForm3.Button3Click(Sender: TObject);
begin
ImageEnView2.IO.SaveToFileJpeg(sFileName+'.jpg');
end;
procedure TForm3.Button4Click(Sender: TObject);
begin
ImageEnView2.IO.SaveToFilePNG(sFileName+'.png');
end;
procedure IEJoinBitmaps_1(Dest: TIEBitmap;
Src: TIEBitmap;
Vertical: Boolean;
BGColor: TColor = clBlack);
var
imgLeft, imgTop: Integer;
totalWidth,totalHeight:Integer;
tmpI:Integer;
begin
if Vertical then//#22402;#30452;#30340;
begin
totalWidth :=Src.Width;
totalHeight:=Src.Height*100;
end
Else
Begin
totalWidth :=Src.Width*100;
totalHeight:=Src.Height;
End;
if totalWidth<=0 then Exit;
if totalHeight<=0 then Exit;
Dest.IEInitialize( totalWidth, totalHeight, BGColor );
imgTop :=0;
imgLeft:=0;
for tmpI := 0 to 99 do
Begin
if Vertical then
begin
imgLeft := ( totalWidth - Src.Width ) div 2;
Src.DrawToTIEBitmap( Dest, imgLeft, imgTop );
Inc(imgTop,Src.Height);
end
else
begin
imgTop := ( totalHeight - Src.Height ) div 2;
Src.DrawToTIEBitmap( Dest, imgLeft, imgTop );
Inc(imgLeft,Src.Width);
end;
End;
end;
procedure TForm3.Button5Click(Sender: TObject);
Var
tmpIEBitmap:TIEBitmap;
begin
tmpIEBitmap:=Self.ImageEnView1.IEBitmap;
tmpIEBitmap.IEInitialize( 10*300, 10*300, clWhite );
tmpIEBitmap.Canvas.Pen.Color:=clRed;
tmpIEBitmap.Canvas.Pen.Width:=20;
tmpIEBitmap.Canvas.LineTo(0,0);
tmpIEBitmap.Canvas.LineTo( tmpIEBitmap.width,tmpIEBitmap.height);
tmpIEBitmap.Canvas.Pen.Color:=clGreen;
tmpIEBitmap.Canvas.Pen.Width:=20;
tmpIEBitmap.Canvas.LineTo(tmpIEBitmap.width,0);
tmpIEBitmap.Canvas.LineTo( 0,tmpIEBitmap.height);
ImageEnView1.Update;
ImageEnView1.Fit();
IEJoinBitmaps_1(Self.ImageEnView2.IEBitmap,
ImageEnView1.IEBitmap,
TRUE,clWhite);
ImageEnView2.Update;
ImageEnView2.FitToWidth;
Self.Caption:=ImageEnView2.IEBitmap_Width.ToString
+' '+ImageEnView2.IEBitmap_Height.ToString;
end;
procedure TForm3.FormCreate(Sender: TObject);
begin
sFileName:='C:\123';
end;





attach/foxdingding/20223314747_SaveBug.zip
91.78 KB