資源簡介
取圖片像素的RGB,很簡單!?。。。。。。。。?!

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?System.IO;
namespace?取顏色的RGB
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????????
??????????
????????}
????????private?void?pictureBox1_MouseMove(object?sender?MouseEventArgs?e)
????????{
????????????int?x?=?e.X;
????????????int?y?=?e.Y;
????????????using?(Bitmap?bmp?=?new?Bitmap(AppDomain.CurrentDomain.baseDirectory?+?“werty.png“))
????????????{
????????????????Color?pixelColor?=?bmp.GetPixel(x?y);
????????????????//像素點顏色的?Alpha?值
????????????????byte?alpha?=?pixelColor.A;
????????????????//顏色的?RED?分量值
????????????????byte?red?=?pixelColor.R;
????????????????//顏色的?GREEN?分量值
????????????????byte?green?=?pixelColor.G;
????????????????//顏色的?BLUE?分量值
????????????????byte?blue?=?pixelColor.B;
????????????????label1.Text?=?“alpha:“?+?alpha?+?“?red:“?+?red?+?“?green:“?+?green?+?“?blue:“?+?blue;
????????????}
????????????
????????}
???
?????
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2011-01-05?14:14??取顏色的RGB\
?????目錄???????????0??2011-01-10?17:00??取顏色的RGB\取顏色的RGB\
?????文件?????????935??2011-01-05?14:14??取顏色的RGB\取顏色的RGB.sln
?????文件???????14336??2011-01-10?17:01??取顏色的RGB\取顏色的RGB.suo
?????目錄???????????0??2011-01-05?14:14??取顏色的RGB\取顏色的RGB\bin\
?????目錄???????????0??2011-01-07?15:38??取顏色的RGB\取顏色的RGB\bin\Debug\
?????文件?????????286??2011-01-07?15:44??取顏色的RGB\取顏色的RGB\bin\Debug\aa.txt
?????文件????????1986??2011-01-05?14:33??取顏色的RGB\取顏色的RGB\bin\Debug\werty.png
?????文件???????13312??2011-01-10?17:01??取顏色的RGB\取顏色的RGB\bin\Debug\取顏色的RGB.exe
?????文件???????26112??2011-01-10?17:01??取顏色的RGB\取顏色的RGB\bin\Debug\取顏色的RGB.pdb
?????文件???????14328??2011-01-10?17:01??取顏色的RGB\取顏色的RGB\bin\Debug\取顏色的RGB.vshost.exe
?????文件?????????490??2007-07-21?01:33??取顏色的RGB\取顏色的RGB\bin\Debug\取顏色的RGB.vshost.exe.manifest
?????文件????????1240??2011-01-10?17:00??取顏色的RGB\取顏色的RGB\Form1.cs
?????文件????????2872??2011-01-05?14:39??取顏色的RGB\取顏色的RGB\Form1.Designer.cs
?????文件????????5814??2011-01-05?14:39??取顏色的RGB\取顏色的RGB\Form1.resx
?????目錄???????????0??2011-01-05?14:14??取顏色的RGB\取顏色的RGB\obj\
?????目錄???????????0??2011-01-10?17:01??取顏色的RGB\取顏色的RGB\obj\Debug\
?????目錄???????????0??2011-01-05?14:35??取顏色的RGB\取顏色的RGB\obj\Debug\TempPE\
?????文件????????4608??2011-01-05?14:35??取顏色的RGB\取顏色的RGB\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll
?????文件?????????788??2011-01-10?17:01??取顏色的RGB\取顏色的RGB\obj\Debug\取顏色的RGB.csproj.FileListAbsolute.txt
?????文件?????????886??2011-01-05?14:39??取顏色的RGB\取顏色的RGB\obj\Debug\取顏色的RGB.csproj.GenerateResource.Cache
?????文件???????13312??2011-01-10?17:01??取顏色的RGB\取顏色的RGB\obj\Debug\取顏色的RGB.exe
?????文件?????????180??2011-01-05?14:39??取顏色的RGB\取顏色的RGB\obj\Debug\取顏色的RGB.Form1.resources
?????文件???????26112??2011-01-10?17:01??取顏色的RGB\取顏色的RGB\obj\Debug\取顏色的RGB.pdb
?????文件????????4569??2011-01-05?14:39??取顏色的RGB\取顏色的RGB\obj\Debug\取顏色的RGB.Properties.Resources.resources
?????文件?????????496??2011-01-05?14:14??取顏色的RGB\取顏色的RGB\Program.cs
?????目錄???????????0??2011-01-05?14:35??取顏色的RGB\取顏色的RGB\Properties\
?????文件????????1410??2011-01-05?14:14??取顏色的RGB\取顏色的RGB\Properties\AssemblyInfo.cs
?????文件????????3103??2011-01-05?14:35??取顏色的RGB\取顏色的RGB\Properties\Resources.Designer.cs
?????文件????????6197??2011-01-05?14:35??取顏色的RGB\取顏色的RGB\Properties\Resources.resx
?????文件????????1100??2011-01-05?14:14??取顏色的RGB\取顏色的RGB\Properties\Settings.Designer.cs
............此處省略2個文件信息
- 上一篇:C#簡單的服務器轉發
- 下一篇:EEMD程序DLL
評論
共有 條評論