BITMAP
using
using
using
using
using
using
using
using
using
System;
[Link];
[Link];
[Link];
[Link];
[Link];
[Link];
[Link];
AviFile;
namespace Digital_Video_Bitmap
{
public partial class Bitmap : Form
{
static [Link] currentbit;
public Bitmap()
{
InitializeComponent();
}
ImageHandler imageHandler = new ImageHandler();
private void button1_Click(object sender, EventArgs e)
{
String fileName = GetFileName("Videos (*.avi)|*.avi;*.mpe;*.mpeg");
if (fileName != null)
{
[Link] = fileName;
ShowFrame();
}
AviManager aviManager = new AviManager([Link], true);
VideoStream stream = [Link]();
[Link]();
[Link] = [Link] = [Link];
string q = [Link]();
string q1 = [Link](0, [Link]("\\")) + "\\testdata\\";
string path = @q1;
string[] filePaths = [Link](@q1);
foreach (string filePath in filePaths)
[Link](filePath);
for (int n = 0; n < [Link]; n++)
{
[Link](n, path + [Link]() + ".bmp");
//[Link] += n + ".bmp finished...\r\n";
//[Link] += path + n + ".bmp\r\n";
}
[Link]();
[Link]();
}
private void ShowFrame()
{
if ([Link]([Link]))
{
try
{
AviManager aviManager = new AviManager([Link], true);
VideoStream aviStream = [Link]();
[Link]();
[Link] bmp =
[Link](Convert.ToInt32([Link]));
[Link] = ([Link])bmp;
[Link]();
[Link]();
}
catch (Exception ex)
{
[Link]([Link]());
}
}
}
private String GetFileName(String filter)
{
OpenFileDialog dlg = new OpenFileDialog();
[Link] = filter;
[Link] = true;
if ([Link] > 0)
{
[Link] = GetCurrentFilePath();
}
if ([Link](this) == [Link])
{
return [Link];
}
else
{
return null;
}
}
private String GetCurrentFilePath()
{
return [Link](0, [Link]("\\") + 1);
}
private void button1_Click_1(object sender, EventArgs e)
{
string q = [Link]();
string imagepath = [Link](0, [Link]("\\")) + "\\modifiedbitmap\\[Link]";
string newvideo = [Link](0, [Link]("\\")) + "\\testdata\\[Link]"; //load the
first image
string imagedirectory = [Link](0, [Link]("\\")) + "\\modifiedbitmap\\";
[Link] bitmap = ([Link])[Link](@imagepath);
//create a new AVI file
AviManager aviManager = new AviManager(@newvideo, false); //create a new AVI file
VideoStream aviStream = [Link](true, 10, bitmap);
int count = 0;
DirectoryInfo di = new DirectoryInfo(@imagedirectory);
FileInfo[] fiArr = [Link]("*.bmp");
for (int n = 0; n < [Link] - 1; n++)
{
bitmap = ([Link])[Link]([Link](0,
[Link]("\\")) + "\\modifiedbitmap\\" + n + ".bmp");
[Link](bitmap);
[Link]();
count++;
}
[Link]();
}
private void button2_Click(object sender, EventArgs e)
{
//FileStream fileStream = new FileStream(@"c:\[Link]", [Link]);
//[Link]();
string q = [Link]();
string imagepath = [Link](0, [Link]("\\")) + "\\testdata\\[Link]";
//string newvideo = [Link](0, [Link]("\\")) + "\\testdata\\[Link]"; //load the
first image
string imagedirectory = [Link](0, [Link]("\\")) + "\\testdata\\";
[Link] bitmap = ([Link])[Link](@imagepath);
//create a new AVI file
AviManager aviManager = new AviManager(@"c:\[Link]", false); //create a new AVI file
VideoStream avis1 = [Link](true, 20, bitmap);//
AddVideoStream(true,10,bitmap);
[Link](bitmap);
int count = 0;
DirectoryInfo di = new DirectoryInfo(@imagedirectory);
FileInfo[] fiArr = [Link]("*.bmp");
for (int n = 0; n < [Link] - 1; n++)
{
bitmap = ([Link])[Link]([Link](0,
[Link]("\\")) + "\\testdata\\" + n + ".bmp");
[Link](bitmap);
[Link]();
count++;
}
[Link]();
}
private void CopyFile(String newName, bool compress)
{
TextBox allfiles = new TextBox();
string q = [Link]();
string imagepath = [Link](0, [Link]("\\")) + "\\testdata\\";
DirectoryInfo d = new DirectoryInfo(imagepath);
FileInfo[] totfiles = [Link]("*.bmp");
foreach (FileInfo f in totfiles)
{ [Link] = [Link] + [Link](); }
AviManager aviManager = new AviManager(imagepath, true); //open compressed file
VideoStream aviStream = [Link]();
//create un-/re-compressed file
VideoStream newStream;
AviManager newManager = [Link](newName, compress, out
newStream);
[Link](); //close compressed file
[Link](); //save and close un-/re-compressed file
}
private void Bitmap_Load(object sender, EventArgs e)
{
}
private void btnbrightness_Click(object sender, EventArgs e)
{
string q = [Link]();
string imagepath = [Link](0, [Link]("\\")) + "\\testdata\\";
DirectoryInfo d = new DirectoryInfo(imagepath);
FileInfo[] totfiles = [Link]("*.bmp");
for (int i = 0; i <= [Link] - 1; i++)
{
string imagepath1 = [Link](0, [Link]("\\")) + "\\testdata\\" + i + ".bmp";
currentbit = ([Link])[Link](imagepath1).Clone();
[Link] temp =
[Link](Convert.ToInt32([Link]), currentbit, i);
[Link] bitsave = ([Link])[Link]();
[Link]([Link](0, [Link]("\\")) + "\\modifiedbitmap\\" + i + ".bmp");
[Link]();
}
}
public int BrightnessValue
{
get
{
return [Link];
}
//set
//{
// [Link] = [Link]();
//}
}
private void btncontrast_Click(object sender, EventArgs e)
{
string q = [Link]();
string imagepath = [Link](0, [Link]("\\")) + "\\testdata\\";
DirectoryInfo d = new DirectoryInfo(imagepath);
FileInfo[] totfiles = [Link]("*.bmp");
for (int i = 0; i <= [Link] - 1; i++)
{
string imagepath1 = [Link](0, [Link]("\\")) + "\\testdata\\" + i + ".bmp";
currentbit = ([Link])[Link](imagepath1).Clone();
[Link] currentimage =
[Link](Convert.ToInt32([Link]), currentbit, i);
[Link]([Link](0, [Link]("\\")) + "\\modifiedbitmap\\" + i +
".bmp");
[Link]();
}
}
private void btninvert_Click(object sender, EventArgs e)
{
string q = [Link]();
string imagepath = [Link](0, [Link]("\\")) + "\\testdata\\";
DirectoryInfo d = new DirectoryInfo(imagepath);
FileInfo[] totfiles = [Link]("*.bmp");
for (int i = 0; i <= [Link] - 1; i++)
{
string imagepath1 = [Link](0, [Link]("\\")) + "\\testdata\\" + i + ".bmp";
currentbit = ([Link])[Link](imagepath1);
[Link] currentbitmap = [Link](new Rectangle(0, 0,
[Link], [Link]), [Link]);
[Link] newbitmap = [Link](currentbitmap);
//[Link] currentimage =
[Link](Convert.ToInt32([Link]), currentbit, i);
".bmp");
}
[Link]([Link](0, [Link]("\\")) + "\\modifiedbitmap\\" + i +
[Link]();
}
private void btngrayscale_Click(object sender, EventArgs e)
{
string q = [Link]();
string imagepath = [Link](0, [Link]("\\")) + "\\testdata\\";
DirectoryInfo d = new DirectoryInfo(imagepath);
FileInfo[] totfiles = [Link]("*.bmp");
for (int i = 0; i <= [Link] - 1; i++)
{
string imagepath1 = [Link](0, [Link]("\\")) + "\\testdata\\" + i + ".bmp";
currentbit = ([Link])[Link](imagepath1);
[Link] currentbitmap = [Link](new Rectangle(0, 0,
[Link], [Link]), [Link]);
[Link] newbitmap = [Link](currentbitmap);
".bmp");
}
[Link]([Link](0, [Link]("\\")) + "\\modifiedbitmap\\" + i +
[Link]();
}
private void txtgamma_Click(object sender, EventArgs e)
{
GammaForm gFrm = new GammaForm();
[Link] = [Link] = [Link] = 0;
if ([Link]() == [Link])
{
string q = [Link]();
string imagepath = [Link](0, [Link]("\\")) + "\\testdata\\";
DirectoryInfo d = new DirectoryInfo(imagepath);
FileInfo[] totfiles = [Link]("*.bmp");
for (int i = 0; i <= [Link] - 1; i++)
{
string imagepath1 = [Link](0, [Link]("\\")) + "\\testdata\\" + i + ".bmp";
currentbit = ([Link])[Link](imagepath1);
[Link] currentbitmap = [Link](new Rectangle(0, 0,
[Link], [Link]), [Link]);
[Link] newbitmap =
[Link]([Link], [Link], [Link],
currentbitmap);
[Link]([Link](0, [Link]("\\")) + "\\modifiedbitmap\\" + i +
".bmp");
}
}
[Link]();
}
Brightness
using
using
using
using
using
using
using
System;
[Link];
[Link];
[Link];
[Link];
[Link];
[Link];
namespace Digital_Video_Bitmap
{
public partial class Brightness : Form
{
public Brightness()
{
InitializeComponent();
[Link] = [Link];
[Link] = [Link];
}
public int BrightnessValue
{
get
{
[Link] = 0;
return Convert.ToInt32([Link]);
}
set { [Link] = Convert.ToInt32([Link]()); }
}
private void btnOK_Click(object sender, EventArgs e)
{
}
COMPARE VIDEO
using
using
using
using
using
using
using
using
System;
[Link];
[Link];
[Link];
[Link];
[Link];
[Link];
[Link];
namespace Digital_Video_Bitmap
{
public partial class comparevideo : Form
{
public comparevideo()
{
InitializeComponent();
}
string newvideo;
string q;
string imagepath;
private void comparevideo_Load(object sender, EventArgs e)
{
q = [Link]();
imagepath = [Link](0, [Link]("\\"));
newvideo = [Link](0, [Link]("\\")) + "\\testdata\\[Link]";
DirectoryInfo d = new DirectoryInfo(imagepath);
FileInfo[] f = [Link]("*.avi");
string r=[Link]();
string r1 = [Link](0).ToString();
[Link] = r + "\\" + r1;
[Link] = newvideo;
}
private void btnplay_Click(object sender, EventArgs e)
{
newvideo = [Link](0, [Link]("\\")) + "\\testdata\\[Link]";
imagepath = [Link](0, [Link]("\\")) + "\\testdata\\[Link]";
q = [Link]();
DirectoryInfo d = new DirectoryInfo(imagepath);
FileInfo[] f = [Link](".avi");
[Link] = f[0].ToString();
[Link] = newvideo;
}
private void pictureBox1_Click(object sender, EventArgs e)
{
[Link]();
}
private void axWindowsMediaPlayer1_Enter(object sender, EventArgs e)
{
}
}
CONTRAST
using
using
using
using
using
using
using
System;
[Link];
[Link];
[Link];
[Link];
[Link];
[Link];
namespace Digital_Video_Bitmap
{
public partial class ContrastForm : Form
{
public ContrastForm()
{
InitializeComponent();
[Link] = [Link];
[Link] = [Link];
public int ContrastValue
{
get
{
[Link] = 0;
return Convert.ToInt32([Link]);
}
set { [Link] =Convert.ToInt32([Link]()); }
private void ContrastForm_Load(object sender, EventArgs e)
{
}
private void btnOK_Click(object sender, EventArgs e)
{
}
}
PROGRESS BAR
using
using
using
using
using
using
using
System;
[Link];
[Link];
[Link];
[Link];
[Link];
[Link];
namespace Digital_Video_Bitmap
{
public partial class fmProgress : Form
{
private bool m_Cancel = false;
public bool Cancel
{
get { return m_Cancel; }
}
public fmProgress()
{
InitializeComponent();
}
private void fmProgress_FormClosing(object sender, FormClosingEventArgs e)
{
// If the user clicks the X or hit's Alt+F4 consider this a cancel
// but don't let the form close, otherwise we can't check the Cancel
// property because the form will be null.
m_Cancel = true;
[Link] = true;
}
private void bnCancel_Click(object sender, EventArgs e)
{
}
FRAME RATE
using
using
using
using
using
using
using
System;
[Link];
[Link];
[Link];
[Link];
[Link];
[Link];
namespace Digital_Video_Bitmap
{
public partial class FrameRateForm : Form
{
private double rate = 0;
public FrameRateForm()
{
InitializeComponent();
}
public double Rate
{
get { return rate; }
}
private void btnOK_Click(object sender, EventArgs e)
{
rate = (double)[Link];
[Link] = [Link];
[Link]();
}
private void btnCancel_Click(object sender, EventArgs e)
{
[Link] = [Link];
[Link]();
}
}
}
GAMMA
using
using
using
using
using
using
using
System;
[Link];
[Link];
[Link];
[Link];
[Link];
[Link];
namespace Digital_Video_Bitmap
{
public partial class GammaForm : Form
{
public GammaForm()
{
InitializeComponent();
[Link] = [Link];
[Link] = [Link];
}
public double RedComponent
{
get
{
if ([Link]([Link]))
[Link] = "0";
return [Link]([Link]);
}
set { [Link] = [Link](); }
}
public double GreenComponent
{
get
{
if ([Link]([Link]))
[Link] = "0";
return [Link]([Link]);
}
set { [Link] = [Link](); }
}
public double BlueComponent
{
get
{
if ([Link]([Link]))
[Link] = "0";
return [Link]([Link]);
}
set { [Link] = [Link](); }
}
private void GammaForm_Load(object sender, EventArgs e)
{
}
private void btnOK_Click(object sender, EventArgs e)
{
}
VIDEO
using
using
using
using
using
using
using
using
using
using
using
System;
[Link];
[Link];
[Link];
[Link];
[Link];
[Link];
[Link];
[Link];
[Link];
AviFile;
namespace Digital_Video_Bitmap
{
public partial class Main : Form
{
ImageHandler imageHandler = new ImageHandler();
static [Link] currentbit;
string videopath, fileName, imagepath, q;
private fmProgress m_fmProgress = null;
private BackgroundWorker m_AsyncWorker = new BackgroundWorker();
[DllImportAttribute("[Link]")]
public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
[DllImportAttribute("[Link]")]
public static extern bool ReleaseCapture();
[DllImport("[Link]", EntryPoint = "CreateRoundRectRgn")]
private static extern IntPtr CreateRoundRectRgn
(
int nLeftRect, // x-coordinate of upper-left corner
int nTopRect, // y-coordinate of upper-left corner
int nRightRect, // x-coordinate of lower-right corner
int nBottomRect, // y-coordinate of lower-right corner
int nWidthEllipse, // height of ellipse
int nHeightEllipse // width of ellipse
);
public Main()
{
InitializeComponent();
Region = [Link](CreateRoundRectRgn(6, 6, Width - 10, Height
+ 30, 20, 20));
m_AsyncWorker.WorkerReportsProgress = true;
m_AsyncWorker.WorkerSupportsCancellation = true;
protected override CreateParams CreateParams
{
get
{
CreateParams cp = [Link];
const int WS_CAPTION = 0xC00000;
[Link] = [Link] & ~WS_CAPTION;
return cp;
}
}
private void logoutToolStripMenuItem_Click(object sender, EventArgs e)
{
[Link]();
Login l = new Login();
[Link]();
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{ [Link](); }
private void Main_MouseDown(object sender, MouseEventArgs e)
{
if ([Link] == [Link])
{
ReleaseCapture();
SendMessage(Handle, 0xA1, 0x2, 0);
}
}
private void menuStrip1_MouseDown(object sender, MouseEventArgs e)
{
if ([Link] == [Link])
{
ReleaseCapture();
SendMessage(Handle, 0xA1, 0x2, 0);
}
}
private void btnbrowse_Click(object sender, EventArgs e)
{
[Link] = "Videos (*.avi)|*.avi;*.mpe;*.mpeg";
if ([Link]() == [Link])
{
[Link] = [Link];
FileInfo f = new FileInfo([Link]);
q = [Link]();
imagepath = [Link](0, [Link]("\\")) + "\\[Link]";
FileInfo f1 = new FileInfo(imagepath);
[Link]();
[Link](imagepath);
[Link] = true;
}
private void ShowFrame()
{
if ([Link]([Link]))
{
try
AviManager aviManager = new AviManager([Link], true);
VideoStream aviStream = [Link]();
[Link]();
[Link] bmp =
[Link](Convert.ToInt32([Link]));
// [Link] = ([Link])bmp;
[Link]();
[Link]();
}
catch (Exception ex)
{
[Link]([Link]());
}
}
}
private String GetFileName(String filter)
{
OpenFileDialog dlg = new OpenFileDialog();
[Link] = filter;
[Link] = true;
if ([Link] > 0)
{
[Link] = GetCurrentFilePath();
}
if ([Link](this) == [Link])
{
return [Link];
}
else
{
return null;
}
}
private String GetCurrentFilePath()
{
return [Link](0, [Link]("\\") + 1);
}
#region Synchronous BackgroundWorker Thread
private void btncreateframe_Click(object sender, EventArgs e)
{
BackgroundWorker bw = new BackgroundWorker(); // Create a background thread
[Link] += new DoWorkEventHandler(bw_DoWork);
[Link] += new
RunWorkerCompletedEventHandler(bw_RunWorkerCompleted);
m_fmProgress = new fmProgress(); // Create a progress form on the UI thread
[Link](); // Kick off the Async thread
m_fmProgress.ShowDialog(this); // Lock up the UI with this modal progress form.
m_fmProgress = null;
[Link] = true;
private void bw_DoWork(object sender, DoWorkEventArgs e)
{
String fileName = [Link];
if (fileName != null)
{
ShowFrame();
}
AviManager aviManager = new AviManager([Link], true);
VideoStream stream = [Link]();
[Link]();
string q = [Link]();
string q1 = [Link](0, [Link]("\\")) + "\\testdata\\";
string path = @q1;
string[] filePaths = [Link](@q1);
DirectoryInfo frames = new DirectoryInfo(q1);
foreach (FileInfo f in [Link]())
[Link]();
for (int n = 0; n < [Link]; n++)
{
[Link](n, path + [Link]() + ".bmp");
m_fmProgress.[Link](
(MethodInvoker)delegate()
{
m_fmProgress.[Link] = "Processing file " + [Link]() + " of " +
[Link]();
m_fmProgress.[Link] = Convert.ToInt32(n * (100.0 /
([Link])));
}
);
if (m_fmProgress.Cancel)
{
[Link] = true;
return;
}
}
[Link] = [Link];
[Link]();
[Link]();
}
public void runworkercompleted(RunWorkerCompletedEventArgs e)
{
if (m_fmProgress != null)
{
m_fmProgress.Hide();
m_fmProgress = null;
}
if ([Link] != null)
{
[Link]([Link]);
return;
}
if ([Link])
{
[Link]("Processing cancelled.");
return;
}
}
private void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
runworkercompleted(e);
}
#endregion
private void btncreatevideo_Click(object sender, EventArgs e)
{
BackgroundWorker bwcreatevideo = new BackgroundWorker(); // Create a background
thread
[Link] += new DoWorkEventHandler(bwcreatevideo_DoWork);
[Link] += new
RunWorkerCompletedEventHandler(bwcreatevideo_RunWorkerCompleted);
m_fmProgress = new fmProgress(); // Create a progress form on the UI thread
[Link](); // Kick off the Async thread
m_fmProgress.ShowDialog(this); // Lock up the UI with this modal progress form.
m_fmProgress = null;
//if ([Link]() == [Link])
// [Link](@"C:\Directory1\[Link]", @"C:\Directory2\[Link]");
//else if ([Link]() == [Link]) { }
}
private void bwcreatevideo_DoWork(object sender, DoWorkEventArgs e)
{
string q = [Link]();
string imagepath = [Link](0, [Link]("\\")) + "\\testdata\\[Link]";
string newvideo = [Link](0, [Link]("\\")) + "\\testdata\\[Link]"; //load the
first image
string imagedirectory = [Link](0, [Link]("\\")) + "\\modifiedbitmap\\";
[Link] bitmap = ([Link])[Link](@imagepath);
//create a new AVI file
AviManager aviManager = new AviManager(@newvideo, false); //create a new AVI file
VideoStream aviStream = [Link](true, 15, bitmap);
DirectoryInfo di = new DirectoryInfo(@imagedirectory);
FileInfo[] fiArr = [Link]("*.bmp");
string imagedirectory1 = [Link](0, [Link]("\\")) + "\\modifiedbitmap\\";
DirectoryInfo di1 = new DirectoryInfo(@imagedirectory1);
//foreach (FileInfo f in [Link]())
// [Link]();
for (int n = 0; n < [Link]().Length - 1; n++)
{
bitmap = ([Link])[Link]([Link](0,
[Link]("\\")) + "\\modifiedbitmap\\" + n + ".bmp");
[Link](bitmap);
[Link]();
m_fmProgress.[Link](
(MethodInvoker)delegate()
{
m_fmProgress.[Link] = "Processing file " + [Link]() + " of " +
[Link]().[Link]();
m_fmProgress.[Link] = Convert.ToInt32(n * (100.0 /
([Link]().Length)));
}
);
if (m_fmProgress.Cancel)
{
[Link] = true;
return;
}
}
[Link]();
}
private void bwcreatevideo_RunWorkerCompleted(object sender,
RunWorkerCompletedEventArgs e)
{
runworkercompleted(e);
}
private void compareVideoToolStripMenuItem_Click(object sender, EventArgs e)
{
comparevideo video = new comparevideo();
[Link]();
}
private void toolStripMenuItem1_Click(object sender, EventArgs e)
{
BackgroundWorker bwbright = new BackgroundWorker(); // Create a background thread
[Link] += new DoWorkEventHandler(bwbright_DoWork);
[Link] += new
RunWorkerCompletedEventHandler(bwbright_RunWorkerCompleted);
m_fmProgress = new fmProgress(); // Create a progress form on the UI thread
[Link](); // Kick off the Async thread
m_fmProgress.ShowDialog(this); // Lock up the UI with this modal progress form.
m_fmProgress = null;
}
private void bwbright_DoWork(object sender, DoWorkEventArgs e)
{
Brightness bright = new Brightness();
if ([Link]() == [Link])
{
string q = [Link]();
string imagepath = [Link](0, [Link]("\\")) + "\\testdata\\";
DirectoryInfo d = new DirectoryInfo(imagepath);
FileInfo[] totfiles = [Link]("*.bmp");
for (int i = 0; i <= [Link] - 1; i++)
{
string imagepath1 = [Link](0, [Link]("\\")) + "\\testdata\\" + i + ".bmp";
currentbit = ([Link])[Link](imagepath1).Clone();
[Link] temp =
[Link](([Link]), currentbit, i);
[Link] bitsave = ([Link])[Link]();
".bmp");
[Link]([Link](0, [Link]("\\")) + "\\modifiedbitmap\\" + i +
[Link]();
m_fmProgress.[Link](
(MethodInvoker)delegate()
{
m_fmProgress.[Link] = "Processing file " + [Link]() + " of " +
[Link]();
m_fmProgress.[Link] = Convert.ToInt32(i * (100.0 /
([Link])));
}
);
if (m_fmProgress.Cancel)
{
[Link] = true;
return;
}
}
}
}
private void bwbright_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs
e)
{
runworkercompleted(e);
}
private void bwcontrast_DoWork(object sender, DoWorkEventArgs e)
{
ContrastForm cFrm = new ContrastForm();
if ([Link]() == [Link])
{
string q = [Link]();
string imagepath = [Link](0, [Link]("\\")) + "\\testdata\\";
DirectoryInfo d = new DirectoryInfo(imagepath);
FileInfo[] totfiles = [Link]("*.bmp");
for (int i = 0; i <= [Link] - 1; i++)
{
string imagepath1 = [Link](0, [Link]("\\")) + "\\testdata\\" + i + ".bmp";
currentbit = ([Link])[Link](imagepath1).Clone();
[Link] currentimage =
[Link]([Link], currentbit, i);
[Link]([Link](0, [Link]("\\")) + "\\modifiedbitmap\\" + i +
".bmp");
[Link]();
m_fmProgress.[Link](
(MethodInvoker)delegate()
{
m_fmProgress.[Link] = "Processing file " + [Link]() + " of " +
[Link]();
m_fmProgress.[Link] = Convert.ToInt32(i * (100.0 /
([Link])));
}
);
if (m_fmProgress.Cancel)
{
[Link] = true;
return;
}
}
private void bwcontrast_RunWorkerCompleted(object sender,
RunWorkerCompletedEventArgs e)
{
runworkercompleted(e);
}
private void toolStripMenuItem2_Click(object sender, EventArgs e)
{
BackgroundWorker bwcontrast = new BackgroundWorker(); // Create a background thread
[Link] += new DoWorkEventHandler(bwcontrast_DoWork);
[Link] += new
RunWorkerCompletedEventHandler(bwcontrast_RunWorkerCompleted);
m_fmProgress = new fmProgress(); // Create a progress form on the UI thread
[Link](); // Kick off the Async thread
m_fmProgress.ShowDialog(this); // Lock up the UI with this modal progress form.
m_fmProgress = null;
}
private void bwinvert_DoWork(object sender, DoWorkEventArgs e)
{
string q = [Link]();
string imagepath = [Link](0, [Link]("\\")) + "\\testdata\\";
DirectoryInfo d = new DirectoryInfo(imagepath);
FileInfo[] totfiles = [Link]("*.bmp");
for (int i = 0; i <= [Link] - 1; i++)
{
string imagepath1 = [Link](0, [Link]("\\")) + "\\testdata\\" + i + ".bmp";
currentbit = ([Link])[Link](imagepath1);
[Link] currentbitmap = [Link](new Rectangle(0, 0,
[Link], [Link]), [Link]);
[Link] newbitmap = [Link](currentbitmap);
//[Link] currentimage =
[Link](Convert.ToInt32([Link]), currentbit, i);
[Link]([Link](0, [Link]("\\")) + "\\modifiedbitmap\\" + i +
".bmp");
[Link]();
m_fmProgress.[Link](
(MethodInvoker)delegate()
{
m_fmProgress.[Link] = "Processing file " + [Link]() + " of " +
[Link]();
m_fmProgress.[Link] = Convert.ToInt32(i * (100.0 /
([Link])));
}
);
if (m_fmProgress.Cancel)
{
[Link] = true;
return;
}
}
private void bwinvert_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs
e)
runworkercompleted(e);
}
private void toolStripMenuItem3_Click(object sender, EventArgs e)
{
BackgroundWorker bwinvert = new BackgroundWorker(); // Create a background thread
[Link] += new DoWorkEventHandler(bwinvert_DoWork);
[Link] += new
RunWorkerCompletedEventHandler(bwinvert_RunWorkerCompleted);
m_fmProgress = new fmProgress(); // Create a progress form on the UI thread
[Link](); // Kick off the Async thread
m_fmProgress.ShowDialog(this); // Lock up the UI with this modal progress form.
m_fmProgress = null;
private void bwgray_DoWork(object sender, DoWorkEventArgs e)
{
string q = [Link]();
string imagepath = [Link](0, [Link]("\\")) + "\\testdata\\";
DirectoryInfo d = new DirectoryInfo(imagepath);
FileInfo[] totfiles = [Link]("*.bmp");
for (int i = 0; i <= [Link] - 1; i++)
{
string imagepath1 = [Link](0, [Link]("\\")) + "\\testdata\\" + i + ".bmp";
currentbit = ([Link])[Link](imagepath1);
[Link] currentbitmap = [Link](new Rectangle(0, 0,
[Link], [Link]), [Link]);
[Link] newbitmap = [Link](currentbitmap);
[Link]([Link](0, [Link]("\\")) + "\\modifiedbitmap\\" + i +
".bmp");
[Link]();
m_fmProgress.[Link](
(MethodInvoker)delegate()
{
m_fmProgress.[Link] = "Processing file " + [Link]() + " of " +
[Link]();
m_fmProgress.[Link] = Convert.ToInt32(i * (100.0 /
([Link])));
}
);
if (m_fmProgress.Cancel)
{
[Link] = true;
return;
}
}
}
private void bwgray_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
runworkercompleted(e);
}
private void tsmigrayscale_Click(object sender, EventArgs e)
{
BackgroundWorker bwgray = new BackgroundWorker(); // Create a background thread
[Link] += new DoWorkEventHandler(bwgray_DoWork);
[Link] += new
RunWorkerCompletedEventHandler(bwgray_RunWorkerCompleted);
m_fmProgress = new fmProgress(); // Create a progress form on the UI thread
[Link](); // Kick off the Async thread
m_fmProgress.ShowDialog(this); // Lock up the UI with this modal progress form.
m_fmProgress = null;
}
private void bwgamma_DoWork(object sender, DoWorkEventArgs e)
{
GammaForm gFrm = new GammaForm();
[Link] = [Link] = [Link] = 0;
if ([Link]() == [Link])
{
string q = [Link]();
string imagepath = [Link](0, [Link]("\\")) + "\\testdata\\";
DirectoryInfo d = new DirectoryInfo(imagepath);
FileInfo[] totfiles = [Link]("*.bmp");
for (int i = 0; i <= [Link] - 1; i++)
{
string imagepath1 = [Link](0, [Link]("\\")) + "\\testdata\\" + i + ".bmp";
currentbit = ([Link])[Link](imagepath1);
[Link] currentbitmap = [Link](new Rectangle(0, 0,
[Link], [Link]), [Link]);
[Link] newbitmap =
[Link]([Link], [Link], [Link],
currentbitmap);
".bmp");
[Link]([Link](0, [Link]("\\")) + "\\modifiedbitmap\\" + i +
[Link]();
m_fmProgress.[Link](
(MethodInvoker)delegate()
{
m_fmProgress.[Link] = "Processing file " + [Link]() + " of " +
[Link]();
m_fmProgress.[Link] = Convert.ToInt32(i * (100.0 / ([Link])));
}
);
if (m_fmProgress.Cancel)
{
[Link] = true;
return;
}
}
}
}
private void bwgamma_RunWorkerCompleted(object sender,
RunWorkerCompletedEventArgs e)
{
runworkercompleted(e);
}
private void tsmigamma_Click(object sender, EventArgs e)
{
BackgroundWorker bwgamma = new BackgroundWorker(); // Create a background thread
[Link] += new DoWorkEventHandler(bwgamma_DoWork);
[Link] += new
RunWorkerCompletedEventHandler(bwgamma_RunWorkerCompleted);
m_fmProgress = new fmProgress(); // Create a progress form on the UI thread
[Link](); // Kick off the Async thread
m_fmProgress.ShowDialog(this); // Lock up the UI with this modal progress form.
m_fmProgress = null;
}
private void pictureBox1_Click(object sender, EventArgs e)
{
[Link] = [Link];
}
private void pictureBox2_Click(object sender, EventArgs e)
{
[Link]();
}
private void button1_Click(object sender, EventArgs e)
{
//framecmp fcmp = new framecmp();
//[Link]();
}
private void Main_Load(object sender, EventArgs e)
{
}
private void button1_Click_1(object sender, EventArgs e)
{
}