資源簡介
LSB算法的實現!對LSB感興趣的朋友或者想學這個算法的朋友,可以下下來看看,這個算法還不錯!

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Drawing.Imaging;
using?System.Text;
using?System.Windows.Forms;
using?System.IO;
namespace?LSB_Algorithm
{
????public?partial?class?Form1?:?Form
????{
????????//用以保存最大可隱藏的信息大小
????????private?long?_maxInfoSize?=?0;
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????#region?以下為信息隱藏TabPage的事件處理
????????///?
????????///?選擇作為載體的BMP圖像
????????///?
????????///?
????????///?
????????private?void?browsepic_btn_Click(object?sender?EventArgs?e)
????????{
????????????OpenFileDialog?filedlg?=?new?OpenFileDialog();
????????????filedlg.Filter?=?“24位位圖?(*.bmp)|*.bmp“;
????????????if?(filedlg.ShowDialog()?==?DialogResult.OK)
????????????{
????????????????FileStream?fs?=?new?FileStream(filedlg.FileName?FileMode.Open?FileAccess.Read);
????????????????using?(Bitmap?bmp?=?new?Bitmap(fs))
????????????????{
????????????????????if?(bmp.PixelFormat?!=?PixelFormat.Format24bppRgb)
????????????????????{
????????????????????????MessageBox.Show(“選擇的圖片并不是24位位圖!“?“LSB“
????????????????????????????????????????MessageBoxButtons.OK?MessageBoxIcon.Information);
????????????????????}
????????????????????else
????????????????????{
????????????????????????_maxInfoSize?=?(fs.Length?-?54)?/?4?-?3;
????????????????????????picpath_tb.Text?=?filedlg.FileName;
????????????????????????picsize_lbl.Text?=?string.Format(“{0:N0}?字節“?fs.Length);
????????????????????????maxinfo_lbl.Text?=?string.Format(“{0:N0}?字節“?_maxInfoSize);
????????????????????}
????????????????}
????????????????fs.Close();
????????????}
????????}
????????///?
????????///?選擇待隱藏的文件
????????///?
????????///?
????????///?
????????private?void?browsehiding_tb_Click(object?sender?EventArgs?e)
????????{
????????????OpenFileDialog?filedlg?=?new?OpenFileDialog();
????????????filedlg.Filter?=?“所有文件?(*.*)|*.*“;
????????????if?(filedlg.ShowDialog()?==?DialogResult.OK)
????????????{
????????????????FileStream?fs?=?new?FileStream(filedlg.FileName?FileMode.Open?FileAccess.Read);
????????????????if?(fs.Length?>?_maxInfoSize)
????????????????{
????????????????????MessageBox.Show(string.Format(“所選文件過大!\n最大可隱藏文件大小為:{0}?字節“?_maxInfoSize)?“LSB“
??????????????????????????????????????????????????MessageBoxButtons.OK?MessageBoxIcon.Information);
????????????????}
????????????????else
????????????????{
????????????????????hiding_tb.Text?=?filedlg.FileName;
????????????????????infosize_lbl.Text?=?string.Format(“{0:N0}?字節“?fs.Length);
????????????????}
????????????????fs.Close();
????????????}
????????}
????????///?
????????///?生成包含隱藏信息的圖像
????????///?
????????///?
????????///?<
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????49152??2007-09-30?22:22??LSB\LSB?Algorithm\bin\Debug\LSB_Algorithm.exe
?????文件??????36352??2007-09-30?22:22??LSB\LSB?Algorithm\bin\Debug\LSB_Algorithm.pdb
?????文件???????5632??2005-11-11?22:25??LSB\LSB?Algorithm\bin\Debug\LSB_Algorithm.vshost.exe
?????文件??????49152??2007-09-30?22:22??LSB\LSB?Algorithm\bin\Release\LSB_Algorithm.exe
?????文件??????32256??2007-09-30?22:22??LSB\LSB?Algorithm\bin\Release\LSB_Algorithm.pdb
?????文件???????5632??2005-11-11?22:25??LSB\LSB?Algorithm\bin\Release\LSB_Algorithm.vshost.exe
?????文件???????7614??2007-09-30?22:02??LSB\LSB?Algorithm\Form1.cs
?????文件??????19194??2007-09-30?10:38??LSB\LSB?Algorithm\Form1.Designer.cs
?????文件??????21312??2007-09-30?10:38??LSB\LSB?Algorithm\Form1.resx
?????文件???????6337??2007-09-29?19:44??LSB\LSB?Algorithm\LSBDecrypt.cs
?????文件???????6844??2007-09-30?22:21??LSB\LSB?Algorithm\LSBEncrypt.cs
?????文件???????3435??2007-09-30?21:46??LSB\LSB?Algorithm\LSB_Algorithm.csproj
?????文件????????914??2007-09-28?19:28??LSB\LSB?Algorithm\LSB_Algorithm.sln
????..A..H.?????23040??2007-09-30?22:22??LSB\LSB?Algorithm\LSB_Algorithm.suo
?????文件??????10134??2001-07-14?03:46??LSB\LSB?Algorithm\myIcon.ico
?????文件????????842??2007-09-30?22:22??LSB\LSB?Algorithm\obj\Debug\LSB_Algorithm.csproj.GenerateResource.Cache
?????文件??????49152??2007-09-30?22:22??LSB\LSB?Algorithm\obj\Debug\LSB_Algorithm.exe
?????文件??????10700??2007-09-30?22:22??LSB\LSB?Algorithm\obj\Debug\LSB_Algorithm.Form1.resources
?????文件??????36352??2007-09-30?22:22??LSB\LSB?Algorithm\obj\Debug\LSB_Algorithm.pdb
?????文件????????180??2007-09-30?22:22??LSB\LSB?Algorithm\obj\Debug\LSB_Algorithm.Properties.Resources.resources
?????文件????????636??2007-09-30?22:22??LSB\LSB?Algorithm\obj\LSB_Algorithm.csproj.FileList.txt
?????文件????????842??2007-09-30?22:22??LSB\LSB?Algorithm\obj\Release\LSB_Algorithm.csproj.GenerateResource.Cache
?????文件??????49152??2007-09-30?22:22??LSB\LSB?Algorithm\obj\Release\LSB_Algorithm.exe
?????文件??????10700??2007-09-30?22:22??LSB\LSB?Algorithm\obj\Release\LSB_Algorithm.Form1.resources
?????文件??????32256??2007-09-30?22:22??LSB\LSB?Algorithm\obj\Release\LSB_Algorithm.pdb
?????文件????????180??2007-09-30?22:22??LSB\LSB?Algorithm\obj\Release\LSB_Algorithm.Properties.Resources.resources
?????文件????????472??2007-09-28?19:28??LSB\LSB?Algorithm\Program.cs
?????文件???????1210??2007-09-28?19:28??LSB\LSB?Algorithm\Properties\AssemblyInfo.cs
?????文件???????2881??2007-09-28?19:28??LSB\LSB?Algorithm\Properties\Resources.Designer.cs
?????文件???????5612??2007-09-28?19:28??LSB\LSB?Algorithm\Properties\Resources.resx
............此處省略18個文件信息
- 上一篇:VCM馬達總成圖紙,音圈馬達的見解
- 下一篇:excel制作的 PLL 計算軟件
評論
共有 條評論