This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
/
FormulaEditor.cs
802 lines (668 loc) · 25.3 KB
/
FormulaEditor.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using ANDREICSLIB.ClassExtras;
using ANDREICSLIB.ClassReplacements;
using ANDREICSLIB.Helpers;
namespace ImageScripter
{
public partial class FormulaEditor : Form
{
public Form1 baseform;
public List<Formula> formulas = new List<Formula>();
public bool isSet;
private string rootFolder = "";
//drag ops
private static PanelReplacement dragging;
private static PanelReplacement dragparent;
private static bool IsDragging;
public static Image gripimage = null;
public const string grippath = "grip.png";
public FormulaEditor(String rootFolders, Form1 baseform1)
{
init(rootFolders, baseform1);
}
public FormulaEditor(String rootFolders, Form1 baseform1, List<Formula> f)
{
init(rootFolders, baseform1);
try
{
Formula.Deserialise(f, ref formulapanel);
}
catch (Exception)
{
MessageBox.Show("Error loading file");
Clear();
}
}
private void init(String rootFolders, Form1 baseform1)
{
InitializeComponent();
if (gripimage == null)
gripimage = EmbeddedResources.ReadEmbeddedImage(grippath);
baseform = baseform1;
rootFolder = rootFolders;
setFormulaStrings();
formulatype.SelectedIndex = 0;
isSet = false;
}
private static void varlocation(ref PanelReplacement PU, bool addall = true)
{
var CB = new ComboBox();
CB.Items.Add(Calculations.RedOP);
CB.Items.Add(Calculations.GreenOP);
CB.Items.Add(Calculations.BlueOP);
if (addall)
CB.Items.Add(Calculations.AllOP);
CB.DropDownStyle = ComboBoxStyle.DropDownList;
CB.SelectedIndex = 0;
PU.AddControl(CB, true);
}
private static void addclosebutton(ref PanelReplacement PU)
{
var B = new Button();
ObjectExtras.AddToolTip(B, "Click here to remove this formula");
B.Click += B_Click;
B.Text = "X";
B.Size = new Size(20, 20);
B.BackColor = Color.Red;
B.ForeColor = Color.White;
PU.AddControl(B, true);
}
private static void addMatrixEditorButton(ref PanelReplacement PU, Control textField = null)
{
var B = new Button();
//ObjectUpdates.addToolTip(B, "Click here to edit matrix using editor");
B.Click += B_Click2;
B.Text = "?";
B.Size = new Size(20, 20);
//B.BackColor = Color.;
//B.ForeColor = Color.White;
if (textField != null)
B.Tag = textField.Name;
PU.AddControl(B, true);
}
private static int getI(PanelReplacement U2, String name)
{
var index = -1;
var count = 0;
foreach (Control C in U2.Controls)
{
if (C.Name.Equals(name))
{
index = count;
break;
}
count++;
}
return index;
}
private static bool SwitchControls(PanelReplacement control, bool up)
{
var U2 = ((PanelReplacement)control.Parent);
var F = ((FormulaEditor)U2.Parent);
if (F == null)
return false;
//get index of this item
var index = getI(U2, control.Name);
if ((index == 0 && up) || (index == U2.Controls.Count - 1 && up == false))
return false;
var newindex = index;
if (up)
newindex--;
else
newindex++;
ListExtras.Swap(ref F.formulas, index, newindex);
U2.SwitchControlLocations(index, newindex);
return true;
}
/*
private static void B_moveUP(object sender, EventArgs e)
{
var shift = false;// KeyboardInfo.isPressed(Keys.Shift);
var success = true;
var B = ((Button)sender);
//name of the panel we want to move
var U = ((PanelReplacement)B.Parent);
while (success)
{
success = SwitchControls(U, true);
if (shift == false)
break;
}
}
private static void B_moveDOWN(object sender, EventArgs e)
{
var shift = false;// KeyboardInfo.isPressed(Keys.Shift);
var success = true;
var B = ((Button)sender);
//name of the panel we want to move
var U = ((PanelReplacement)B.Parent);
while (success)
{
success=SwitchControls(U, false);
if (shift == false)
break;
}
}
*/
public static bool isUsableControl(Control C)
{
return !(C is Button || C is Label || C is Panel);
}
public static void PanelMD(object sender, MouseEventArgs e)
{
if (e.Button != MouseButtons.Left)
return;
dragging = ((PanelReplacement)((Panel)sender).Parent);
dragparent = dragging.Parent as PanelReplacement;
IsDragging = true;
}
public static void PanelMU(object sender, MouseEventArgs e)
{
dragging = null;
dragparent = null;
IsDragging = false;
}
private static void P_MouseMove(object sender, MouseEventArgs e)
{
if (IsDragging == false)
return;
var ey = e.Y + dragging.Location.Y;
//check pos in regards to panels adjacent to dragging one
var dragindex = getI(dragparent, dragging.Name);
if ((dragindex == 0 && ey < dragging.Location.Y) ||
(dragindex == dragparent.Controls.Count && ey > dragging.Location.Y))
return;
if (ey < dragging.Location.Y)
SwitchControls(dragging, true);
else if (ey > dragging.Location.Y + dragging.Height)
SwitchControls(dragging, false);
}
private static void addMoveArrows(ref PanelReplacement PU)
{
var P = new Panel();
P.Size = new Size(PU.Height, PU.Height);
P.BackgroundImageLayout = ImageLayout.Center;
P.BackgroundImage = gripimage;
P.Cursor = Cursors.SizeAll;
P.MouseDown += PanelMD;
P.MouseUp += PanelMU;
P.MouseMove += P_MouseMove;
PU.AddControl(P, true);
}
private static void addvariablesCB(ref PanelReplacement PU, bool noVariables = false)
{
var add = Calculations.GetVarList(noVariables);
var CB = new ComboBox();
foreach (var s in add)
{
CB.Items.Add(s);
}
CB.DropDownStyle = ComboBoxStyle.DropDownList;
CB.SelectedIndex = 0;
PU.AddControl(CB, true);
}
private static void addLabel(String textl, ref PanelReplacement PU)
{
var L = new Label();
L.Text = textl;
//L.Size = new System.Drawing.Size(10, 10);
if (L.Text.Length < 10)
L.Size = new Size(7 * L.Text.Length, 20);
else
L.Size = new Size(5 * L.Text.Length, 20);
L.AutoSize = true;
PU.AddControl(L, true);
}
private static void addNumbers(ref PanelReplacement PU, List<int> possibilities)
{
var CB = new ComboBox();
foreach (var i in possibilities)
{
CB.Items.Add(i.ToString());
}
if (CB.Items.Count > 0)
CB.SelectedIndex = 0;
PU.AddControl(CB, true);
}
private static Control addStrings(ref PanelReplacement PU, List<String> possibilities)
{
var CB = new ComboBox();
foreach (var i in possibilities)
{
CB.Items.Add(i);
}
if (CB.Items.Count > 0)
CB.SelectedIndex = 0;
PU.AddControl(CB, true);
return CB;
}
private static void addCommentLine(ref PanelReplacement PU)
{
var TB = new TextBox();
TB.Width = 600;
PU.AddControl(TB, true);
}
private static void addPassLine(ref PanelReplacement PU)
{
addLabel("The following will only be executed on pass number:", ref PU);
addNumbers(ref PU, new List<int> { 1, 2, 3 });
}
private static void addSwapLine(ref PanelReplacement PU)
{
addLabel("move", ref PU);
//source
addvariablesCB(ref PU);
varlocation(ref PU, false);
addLabel("to", ref PU);
//destination
addvariablesCB(ref PU);
varlocation(ref PU);
}
private static void addMoveLine(ref PanelReplacement PU)
{
addLabel("move", ref PU);
//source
addvariablesCB(ref PU);
addLabel("to", ref PU);
//destination
addvariablesCB(ref PU);
}
private static void AddCustomNHOperation(ref PanelReplacement PU)
{
addLabel("Apply Matrix:", ref PU);
//serialised matrix, rows separated by .
var C = addStrings(ref PU, new List<String> { "", Calculations.Custom1, Calculations.Custom2, Calculations.Custom3 });
//matrix editor button
addMatrixEditorButton(ref PU, C);
addLabel("from", ref PU);
addvariablesCB(ref PU, true);
addLabel("from", ref PU);
varlocation(ref PU);
addLabel("to", ref PU);
addvariablesCB(ref PU);
}
private static void AddPresetNHOperation(ref PanelReplacement PU)
{
addLabel("from current pixel diameter:", ref PU);
addNumbers(ref PU, new List<int> { 1, 2, 5 });
addLabel("take the", ref PU);
var cb = new ComboBox();
cb.Items.Add(Calculations.MeanAverage);
cb.Items.Add(Calculations.MedianAverage);
cb.DropDownStyle = ComboBoxStyle.DropDownList;
cb.SelectedIndex = 0;
PU.AddControl(cb, true);
addLabel("from", ref PU);
addvariablesCB(ref PU, true);
addLabel("from", ref PU);
varlocation(ref PU);
addLabel("to", ref PU);
addvariablesCB(ref PU);
}
private static void addOperations(ref PanelReplacement PU)
{
//pixel operations
var CB = new ComboBox();
CB.Items.Add(Calculations.Subtractop);
CB.Items.Add(Calculations.Addop);
CB.Items.Add(Calculations.Multiplyop);
CB.Items.Add(Calculations.Divideop);
CB.Items.Add(Calculations.Modulusop);
CB.DropDownStyle = ComboBoxStyle.DropDownList;
CB.SelectedIndex = 0;
PU.AddControl(CB, true);
}
private static void AddUserPixelOperationline(ref PanelReplacement PU)
{
addLabel("from", ref PU);
addvariablesCB(ref PU);
addOperations(ref PU);
var TB = new TextBox();
TB.KeyPress += handlefloatinput;
PU.AddControl(TB, true);
addLabel("from", ref PU);
varlocation(ref PU);
addLabel("to", ref PU);
addvariablesCB(ref PU);
}
private static void AddVarPixelOperationline(ref PanelReplacement PU)
{
addLabel("from", ref PU);
addvariablesCB(ref PU);
addOperations(ref PU);
addvariablesCB(ref PU);
varlocation(ref PU);
addLabel("to", ref PU);
addvariablesCB(ref PU);
}
private static void addComparisons(ref PanelReplacement PU)
{
var CB = new ComboBox();
CB.Items.Add(Calculations.LTop);
CB.Items.Add(Calculations.LEop);
CB.Items.Add(Calculations.EQop);
CB.Items.Add(Calculations.GEop);
CB.Items.Add(Calculations.GTop);
CB.DropDownStyle = ComboBoxStyle.DropDownList;
CB.SelectedIndex = 0;
PU.AddControl(CB, true);
}
private static void addIfPosConditionLine(ref PanelReplacement PU)
{
addLabel(Calculations.Ifposcondition, ref PU);
var CB = new ComboBox();
CB.Items.Add(Calculations.XPOS);
CB.Items.Add(Calculations.YPOS);
CB.DropDownStyle = ComboBoxStyle.DropDownList;
CB.SelectedIndex = 0;
PU.AddControl(CB, true);
CB = new ComboBox();
CB.Items.Add(Calculations.PosPercent);
CB.Items.Add(Calculations.PosPixels);
CB.DropDownStyle = ComboBoxStyle.DropDownList;
CB.SelectedIndex = 0;
PU.AddControl(CB, true);
addLabel("is", ref PU);
addComparisons(ref PU);
var TB = new TextBox();
TB.KeyPress += handlenumbersinput;
PU.AddControl(TB, true);
addLabel("then...", ref PU);
}
private static void addIfConditionLine(ref PanelReplacement PU)
{
addLabel(Calculations.Ifcolcondition, ref PU);
addvariablesCB(ref PU);
addLabel("value", ref PU);
varlocation(ref PU);
addLabel("is", ref PU);
addComparisons(ref PU);
var TB = new TextBox();
TB.KeyPress += handlenumbersinput;
PU.AddControl(TB, true);
addLabel("then...", ref PU);
}
private static void addEndIfConditionLine(ref PanelReplacement PU)
{
var CB = new ComboBox();
CB.Items.Add(Calculations.Endifcondition);
CB.DropDownStyle = ComboBoxStyle.DropDownList;
CB.SelectedIndex = 0;
PU.AddControl(CB, true);
}
private void addrowbutton_Click(object sender, EventArgs e)
{
formulas.Add(addline(ref formulapanel, formulatype.Text, subformulatype.Text));
}
private void subformulachange()
{
subformulatype.Items.Clear();
//get the list of sub ops for this operation
var subops = Calculations.operationdic[formulatype.Text];
if (subops == null || subops.Count == 0)
subformulatype.Enabled = false;
else
{
subformulatype.Enabled = true;
foreach (var s in subops)
{
subformulatype.Items.Add(s);
}
}
if (subformulatype.Items.Count > 0)
subformulatype.SelectedIndex = 0;
}
private void formulatype_SelectedIndexChanged(object sender, EventArgs e)
{
subformulachange();
}
private void loadformulas()
{
loadedformulas.Items.Clear();
var init = rootFolder + "\\" + Form1.Formulafolder;
foreach (var s in Directory.GetFiles(init))
{
if (s.EndsWith(Form1.Formulaextension))
{
var LVI = new ListViewItem(s.Substring(s.LastIndexOf('\\') + 1));
LVI.Name = s;
loadedformulas.Items.Add(LVI);
}
}
}
private void setFormulaStrings()
{
//add all the operations
foreach (var kvp in Calculations.operationdic)
{
formulatype.Items.Add(kvp.Key);
}
}
private void FormulaEditor_Load(object sender, EventArgs e)
{
formulatype.Text = formulatype.Items[0].ToString();
subformulachange();
loadformulas();
}
private void saveformula_Click(object sender, EventArgs e)
{
var SFD = new SaveFileDialog();
var init = rootFolder + "\\" + Form1.Formulafolder;
SFD.InitialDirectory = init;
SFD.Filter = "ImageOP Formula|*." + Form1.Formulaextension;
SFD.AddExtension = true;
var DR = SFD.ShowDialog();
if (DR != DialogResult.OK)
return;
var FS = new FileStream(SFD.FileName, FileMode.Create);
var SW = new StreamWriter(FS);
var count = 0;
foreach (var f in formulas)
{
var PU = formulapanel.Controls[count] as PanelReplacement;
count++;
SW.WriteLine("FSTART");
if (f.Operations.Count == 0)
f.setoperations(ref PU);
SW.Write(f.serialise());
SW.WriteLine("FEND");
}
SW.Close();
FS.Close();
}
private void clearbutton_Click(object sender, EventArgs e)
{
formulapanel.ClearControls();
formulas.Clear();
}
private void okbutton_Click(object sender, EventArgs e)
{
var count = 0;
foreach (var f in formulas)
{
var PU = formulapanel.Controls[count] as PanelReplacement;
count++;
f.setoperations(ref PU);
}
isSet = true;
Close();
}
private void loadformula_Click(object sender, EventArgs e)
{
if (loadedformulas.SelectedItems.Count != 1)
return;
var s = loadedformulas.SelectedItems[0].Name;
try
{
Formula.Deserialise(s, ref formulapanel);
}
catch (Exception)
{
MessageBox.Show("Error loading file");
Clear();
}
}
private void Clear()
{
formulas.Clear();
formulapanel.ClearControls();
}
private static void B_Click(object sender, EventArgs e)
{
var B = ((Button)sender);
var U = ((PanelReplacement)B.Parent);
var F = ((FormulaEditor)U.Parent.Parent);
Formula fm = null;
foreach (var f in F.formulas)
{
if (f.ID.Equals(U.Name))
{
fm = f;
break;
}
}
if (fm != null)
{
F.formulas.Remove(fm);
}
F.formulapanel.RemoveControl(U.Name);
}
private static void B_Click2(object sender, EventArgs e)
{
var B = ((Button)sender);
var U = ((PanelReplacement)B.Parent);
var C = U.GetControlByName(B.Tag as String);
var ME = new matrixeditor(C.Text);
ME.ShowDialog();
if (string.IsNullOrEmpty(ME.result))
return;
((ComboBox)C).Items.Add(ME.result);
C.Text = ME.result;
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
Application.Exit();
}
private static void handlefloatinput(object sender, KeyPressEventArgs e)
{
e.Handled = TextboxExtras.HandleInput(TextboxExtras.InputType.Create(false, true, true, false), e.KeyChar);
}
private static void handlenumbersinput(object sender, KeyPressEventArgs e)
{
e.Handled = TextboxExtras.HandleInput(TextboxExtras.InputType.Create(false, true, false, false), e.KeyChar);
}
public static Formula addline(ref PanelReplacement formulapanel, string type, string subtype)
{
var newPanel = new PanelReplacement();
newPanel.BackColor = Color.FromArgb(200, 200, 200);
newPanel.Size = new Size(formulapanel.Width, 25);
//add move arrows
addMoveArrows(ref newPanel);
//operation
if (type.Equals(Calculations.Moveoperation))
{
if (subtype.Equals(Calculations.Moveop))
addMoveLine(ref newPanel);
else if (subtype.Equals(Calculations.Swapop))
addSwapLine(ref newPanel);
}
else if (type.Equals(Calculations.Operation))
{
if (subtype.Equals(Calculations.UserInputPixelOperation))
AddUserPixelOperationline(ref newPanel);
else if (subtype.Equals(Calculations.VarInputPixelOperation))
AddVarPixelOperationline(ref newPanel);
else if (subtype.Equals(Calculations.PresetNeighbourhoodOperations))
AddPresetNHOperation(ref newPanel);
else if (subtype.Equals(Calculations.CustomNeighbourhoodOperations))
AddCustomNHOperation(ref newPanel);
}
else if (type.Equals(Calculations.Conditionoperation))
{
if (subtype.Equals(Calculations.Ifcolcondition))
addIfConditionLine(ref newPanel);
else if (subtype.Equals(Calculations.Endifcondition))
addEndIfConditionLine(ref newPanel);
else if (subtype.Equals(Calculations.Ifposcondition))
addIfPosConditionLine(ref newPanel);
}
else if (type.Equals(Calculations.Passoperation))
{
addPassLine(ref newPanel);
}
else if (type.Equals(Calculations.Commentop))
{
addCommentLine(ref newPanel);
}
//add remove button
addclosebutton(ref newPanel);
var C = formulapanel.AddControl(newPanel, false);
var f = new Formula();
f.type = type;
f.subtype = subtype;
f.ID = C.Name;
//reset width here
var last = newPanel.Controls[newPanel.Controls.Count - 1];
newPanel.Size = new Size(last.Location.X + last.Width + 1, 25);
return f;
}
private void helptextbutton_Click(object sender, EventArgs e)
{
var type = formulatype.Text;
var subtype = subformulatype.Text;
var helptitle = "Help for type:" + type + " subtype:" + subtype;
var helptext = "";
if (type.Equals(Calculations.Moveoperation))
{
if (subtype.Equals(Calculations.Moveop))
helptext = "Move a pixels RGB";
else if (subtype.Equals(Calculations.Swapop))
helptext = "Move a pixels R,G or B separately";
}
else if (type.Equals(Calculations.Operation))
{
if (subtype.Equals(Calculations.UserInputPixelOperation))
helptext = "Perform an add,minus,divide,multiple or modulo operation with an inputted value";
else if (subtype.Equals(Calculations.VarInputPixelOperation))
helptext = "Perform an add,minus,divide,multiple or modulo operation from another value";
else if (subtype.Equals(Calculations.PresetNeighbourhoodOperations))
helptext = "Apply a preset neighbourhood operation, such as an average";
else if (subtype.Equals(Calculations.CustomNeighbourhoodOperations))
helptext = "Apply a custom user neighbourhood operation";
}
else if (type.Equals(Calculations.Conditionoperation))
{
if (subtype.Equals(Calculations.Ifcolcondition))
helptext = "start an if block condition depending on a pixels value";
else if (subtype.Equals(Calculations.Endifcondition))
helptext = "end an if block condition";
else if (subtype.Equals(Calculations.Ifposcondition))
helptext = "start an if block condition depending on the location of the current pixel";
}
else if (type.Equals(Calculations.Passoperation))
{
helptext = "Wait until the next pass for the next operations to occur. Does not affect other pass operations";
}
else if (type.Equals(Calculations.Commentop))
{
helptext = "Add a comment that does not affect operation";
}
if (helptext.Length > 0)
MessageBox.Show(helptext, helptitle, MessageBoxButtons.OK);
}
private void helpToolStripMenuItem_Click(object sender, EventArgs e)
{
String ht =
@"
When applying a formula, every pixel is run through in X/Y order applying the following operations.
For example, if you wanted to simply copy the input image, you would just put a move current pixel to the output pixel.
If you want to do multi pass operations, the same applies, but you would use a pass block. This ensures the following ops only work for a certain pass.
For example, if you want to add some red to each pixel, and then blur, you would use a user input pixel operation, then a pass block for pass 2, then a neighbourhood operation.";
MessageBox.Show(ht, "Formula Editor Help", MessageBoxButtons.OK);
}
}
}