• Content count

  • Joined

  • Last visited

Community Reputation


About Anaco

  1. Ok i finally sorted some stuff out. So I've added Before and After screen shots. Fixed a glitch in the code (The plus option was doing times and Viseversa).
  2. Hello, this is a fantastic tutorial with highly varying results but I've got one suggestion: Use the Zoom blur deluxe plug-in instead of the built in zoom bur (just search Zoom blur deluxe in plug-in publishing only)
  3. edit: see first post for updates, errors and questions.
  4. Hello this is my first plug-in. This plug-in simply subtracts the red blue green by x+y or x-y or x*y depending on the option you select and then divides it by the amount you specified. It creates a strange tiled gradient. Colour
  5. but this is actually a very simple plug-in because this is all it does: loads_image for(x=Rect.Left; x{ for(y=Rect.Top; y{ if red at x,y on image does not equal red at x,y on loaded image { alpha at x,y on image equals 100% } if blue at x,y on image does not equal blue at x,y on loaded image { alpha at x,y on image equals 100% } if green at x,y on image does not equal green at x,y on loaded image { alpha at x,y on image equals 100% } } }
  6. Simon if you could (or anyone else) show a Code Lab script Example which allows the user to pick the file location? that would help me a lot (To Google!)
  7. @ Simon Brown you do know this is a plug-in, right? because I'm not asking how would i do this through already existing functions. Sorry If i just sounded a bit rude just now but I wasn't trying to Ok I've got a few questions: .How do you add to a selection through code? .How do you load an image through code? .How do you accesses the loaded image through code?
  8. Sorry i wasn't sure which forum i should of been posted in :? and yes this is gong to be a plug-in.
  9. Thank you Simon Brown. I searched reflector and I've downloaded it. and also I didn't notice what difference did well now i do well it looks like there's no point in me trying to make a plug-in for that Thanks Again edit: actually there is point in the plug in because the difference blend darkens a cyan color the more simulator color it is. here's the logic it would have i think for (int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { if pixel at x,y on image's RGB does not equal pixel at x,y on other image's RGB { add pixel at x y to selection } } } tell me if you see any flaws
  10. Hello, I'm trying to build a plug-in that will delete (turn alpha to 0) Any Similarity/Differences between two images. At the moment the problem I'm having is an error in the bitmap loading. Hidden Content: using System;using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Text.RegularExpressions; using System.Windows.Forms; using PaintDotNet.Effects; using PaintDotNet; using System.IO; namespace EffectsPluginTemplate1 { public class EffectPluginConfigDialog : PaintDotNet.Effects.EffectConfigDialog { private Button buttonOK; private OpenFileDialog openFileDialog1; private ComboBox comboBox1; private Button ButtonBrowse; private Button buttonCancel; public EffectPluginConfigDialog() { InitializeComponent(); } protected override void InitialInitToken() { theEffectToken = new EffectPluginConfigToken(); } protected override void InitTokenFromDialog() { // ((EffectPluginConfigToken)EffectToken).variable = dialogVariable; } protected override void InitDialogFromToken(EffectConfigToken effectToken) { // EffectPluginConfigToken token = (EffectPluginConfigToken)effectToken; // dialogVariable = token.variable; } private void InitializeComponent() { this.buttonCancel = new System.Windows.Forms.Button(); this.buttonOK = new System.Windows.Forms.Button(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.comboBox1 = new System.Windows.Forms.ComboBox(); this.ButtonBrowse = new System.Windows.Forms.Button(); this.SuspendLayout(); // // buttonCancel // this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonCancel.Location = new System.Drawing.Point(324, 249); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(75, 23); this.buttonCancel.TabIndex = 1; this.buttonCancel.Text = "Cancel"; this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); // // buttonOK // this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonOK.Location = new System.Drawing.Point(243, 249); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(75, 23); this.buttonOK.TabIndex = 2; this.buttonOK.Text = "OK"; this.buttonOK.UseVisualStyleBackColor = true; this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); // // openFileDialog1 // this.openFileDialog1.FileName = "openFileDialog1"; this.openFileDialog1.FileOk += new System.ComponentModel.CancelEventHandler(this.openFileDialog1_FileOk); // // comboBox1 // this.comboBox1.FormattingEnabled = true; this.comboBox1.Location = new System.Drawing.Point(12, 12); this.comboBox1.Name = "comboBox1"; this.comboBox1.Size = new System.Drawing.Size(306, 21); this.comboBox1.TabIndex = 3; // // ButtonBrowse // this.ButtonBrowse.Location = new System.Drawing.Point(324, 12); this.ButtonBrowse.Name = "ButtonBrowse"; this.ButtonBrowse.Size = new System.Drawing.Size(75, 21); this.ButtonBrowse.TabIndex = 4; this.ButtonBrowse.Text = "Browse"; this.ButtonBrowse.UseVisualStyleBackColor = true; this.ButtonBrowse.Click += new System.EventHandler(this.button1_Click); // // EffectPluginConfigDialog // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.ClientSize = new System.Drawing.Size(411, 284); this.Controls.Add(this.ButtonBrowse); this.Controls.Add(this.comboBox1); this.Controls.Add(this.buttonOK); this.Controls.Add(this.buttonCancel); this.Location = new System.Drawing.Point(0, 0); this.Name = "EffectPluginConfigDialog"; this.Controls.SetChildIndex(this.buttonCancel, 0); this.Controls.SetChildIndex(this.buttonOK, 0); this.Controls.SetChildIndex(this.comboBox1, 0); this.Controls.SetChildIndex(this.ButtonBrowse, 0); this.ResumeLayout(false); } private void buttonOK_Click(object sender, EventArgs e) { FinishTokenUpdate(); DialogResult = DialogResult.OK; this.Close(); } private void buttonCancel_Click(object sender, EventArgs e) { this.Close(); } private void button1_Click(object sender, EventArgs e) { Stream myStream = null; OpenFileDialog openFileDialog1 = new OpenFileDialog(); openFileDialog1.InitialDirectory = "c:\\"; openFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*"; openFileDialog1.FilterIndex = 2; openFileDialog1.RestoreDirectory = true; if (openFileDialog1.ShowDialog() == DialogResult.OK) { try { if ((myStream = openFileDialog1.OpenFile()) != null) { using (myStream) { Bitmap loadedBmp = new Bitmap(Image.FromFile(myStream)); Surface imgSurface = Surface.FromBitmap(loadedBmp); } } } catch (Exception ex) { MessageBox.Show("Error: Could not read file from disk. Original error: " + ex.Message); } } } private void openFileDialog1_FileOk(object sender, CancelEventArgs e) { } } } Here are the errors: "Error 1 The best overloaded method match for 'System.Drawing.Image.FromFile(string)' has some invalid arguments." "Error 2 Argument '1': cannot convert from 'System.IO.Stream' to 'string'" "Error 3 'PaintDotNet.Surface' does not contain a definition for 'FromBitmap'" BTW I'm a noob to Plug-in coding but I've had a fair amount of experience in coding using a language which syntax highly similar to C#'s syntax (Yes i learned GML ). If anyone has a plug-in coding guide for Microsoft Visual C# 2008 express edition please don't hesitate to tell me .