博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Delphi 与 DirectX 之 DelphiX(52): TDIB.DoSaturation();
阅读量:6811 次
发布时间:2019-06-26

本文共 781 字,大约阅读时间需要 2 分钟。

  hot3.png

本例效果图:
26153729_oTEo.gif

代码文件:

unit Unit1;interfaceuses  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,  Dialogs, DIB, StdCtrls;type  TForm1 = class(TForm)    DXPaintBox1: TDXPaintBox;    Button1: TButton;    Button2: TButton;    procedure Button1Click(Sender: TObject);    procedure Button2Click(Sender: TObject);  end;var  Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);const  ImgPath1 = 'C:\Temp\DX.jpg';begin  DXPaintBox1.DIB.LoadFromFile(ImgPath1);  DXPaintBox1.Width := DXPaintBox1.DIB.Width;  DXPaintBox1.Height := DXPaintBox1.DIB.Height;  DXPaintBox1.Repaint;end;procedure TForm1.Button2Click(Sender: TObject);begin  DXPaintBox1.DIB.DoSaturation(8);  DXPaintBox1.Repaint;end;end.

转载于:https://my.oschina.net/hermer/blog/320465

你可能感兴趣的文章