uses GdiPlus;

procedure TForm1.Button1Click(Sender: TObject);
var
  img: IGPImage;
  bit: IGPBitmap;
  g: IGPGraphics;
begin
  img := TGPImage.Create('c:\temp\01.png');
  bit := TGPBitmap.Create(img.Width, img.Height, PixelFormat1bppIndexed);
  g := TGPGraphics.Create(bit);
  g.DrawImage(img, 0, 0, img.Width, img.Height);
  bit.Save('c:\temp\02.png', TGPImageFormat.Png);
end;

相关文章:

  • 2022-12-23
  • 2021-04-10
  • 2021-06-02
  • 2021-12-09
  • 2022-12-23
  • 2021-10-12
  • 2021-05-14
猜你喜欢
  • 2022-01-14
  • 2021-09-15
  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
  • 2021-04-21
相关资源
相似解决方案