Jump to content

TechnoRobbo

Members
  • Posts

    1,740
  • Joined

  • Last visited

  • Days Won

    132

Everything posted by TechnoRobbo

  1. Here you go - it's your code, I just took out all that confusing rounding, works fine now. #region UICode double Amount1 = 2; // [-10,10] Sampling range bool Amount2 = false; // [0,1] Detect opposite edge double Amount3 = 45; // [-180,180] Edge angle double Amount4 = 1; // [0,1] Intensity threshold double Amount5 = 255; // [0,255] Red threshold double Amount6 = 255; // [0,255] Green threshold double Amount7 = 255; // [0,255] Blue threshold double Amount8 = 255; // [0,255] Alpha threshold byte Amount9 = 0; // Background Color|Black|Transparent, no image|Transparent, with image #endregion void Render(Surface dst, Surface src, Rectangle rect) { //debug section //Amount4 = .1; //end debug //Creates a variable to store the current pixel. ColorBgra CurrentPixel,Col1,Col2; //Calculates the x and y components of the vector created by the angle chooser. //The Pi/180 part converts the degrees to radians so the functions work. double rads = Amount3 * Math.PI /180; double magX = Math.Cos(rads) * Amount1; double magY = Math.Sin(rads) * Amount1; //The for loops iterate through all pixels. for (float y = rect.Top; y < rect.Bottom; y++) { //Cancels by user request. if (IsCancelRequested) { return; } for (float x = rect.Left; x < rect.Right; x++) { //Sets the value of the current pixel to be transparent or black. //The pixel color will later become white if an edge is detected. if (Amount9 == 0) { CurrentPixel = ColorBgra.Black; } else if (Amount9 == 1) { CurrentPixel = ColorBgra.FromBgra(0, 0, 0, 0); } else { CurrentPixel = src[(int)x,(int)y]; } //Checks if the pixels to be looked at in the sampling range actually exist. //If intensity is being calculated. //Gets the intensities of the pixels. Col1 = src.GetBilinearSampleClamped(x, y); Col2 = src.GetBilinearSampleClamped(x + (float)magX, y + (float)magY); if (Amount4 < 1) { //The intensity threshold has been reached. if ((Col1.GetIntensity()- Col2.GetIntensity()) > Amount4 || (Col2.GetIntensity()- Col1.GetIntensity()) < -Amount4) { CurrentPixel = ColorBgra.White; } } //If red is being calculated. if (Amount5 < 255) { //The redness threshold has been reached. if ((Col1.R - Col2.R > Amount5) || (Col2.R - Col1.R < -Amount5)) { CurrentPixel = Color.White; } } //If green is being calculated. if (Amount6 < 255) { //The green-ness threshold has been reached. if ((Col1.G - Col2.G > Amount6) || (Col2.G - Col1.G < -Amount6)) { CurrentPixel = Color.White; } } //If blue is being calculated. if (Amount7 < 255) { //The blueness threshold has been reached. if ((Col1.B - Col2.B > Amount7) || (Col2.B - Col1.B < -Amount7)) { CurrentPixel = Color.White; } } //If alpha is being calculated. if (Amount8 < 255) { //The alpha threshold has been reached. if ((Col1.A - Col2.A > Amount8) || (Col2.A - Col1.A < -Amount8)) { CurrentPixel = Color.White; } } //Changes the foreground color to black for visibility if the background is transparent. if (Amount9 == 1 && CurrentPixel.Equals(Color.White)) { CurrentPixel = Color.Black; } // //Applies everything again (in the next iteration), but from the exact opposite angle. if (Amount2) { magX = Math.Cos(rads + Math.PI) * Amount1; magY = Math.Sin(rads + Math.PI) * Amount1; } //Applies all changes to the destination surface. dst[(int)x, (int)y] = CurrentPixel; } } }
  2. I only addressed 1 and -1 error but the rounding issues are all over. Try type casting as in my example. Can examine more later on tonight.
  3. Good point, but Ego is busy enough - keeping track of builds would be a huge work load. If the plugin appears in the right and/or middle panel than I think we accomplished what we set out to do, suggest options.
  4. your rounding back to zero Set up a temp variable before the loops ColorBgra tmp2; Change this double pix2Int = src[(int)(x + magX), (int)(y + magY)].GetIntensity(); to this //Gets the intensities of the pixels. tmp2 = src.GetBilinearSample((float)x + (float)magX, (float)y + (float)magY); double pix2Int = tmp2.GetIntensity();
  5. if the title of the plugin is an exact match to the title in the plugin index (No extra spaces,no word "plugin" added) the search should not make a suggestion, since you already have the plugin. In a lot of instances the title in the plugin doesn't match the write up (therefore the index) and it appears in the suggestion. For instance the if you have Planetoid, the search word "planet" should not create a suggestion since it's Plugin Index name matches the plugin name. The intent was to reduce duplication.That being said, you and I must have different versions of Print it to cause different results. I have 0.7.0.396 You may have the latest version 0.8
  6. We are very off topic. Most of the example you gave are not film strips - it's the same image tiled,then processed through numerous filters. The last one is a filmstrip. Also processed through several effects. Have you tried playing around with effects in Paint.net and the effects offered on this board? Once you have found the effects you like you can layer them in Scriptlab and save them for repeatability. So the ultimate answer to your question is you. Here's an example using Rotate/Zoom and my ColorHMS Plugin
  7. Did you receive this file from someone else?
  8. http://forums.getpaint.net/overpopular-feature-requests/?p=22115 Rick has addressed this topic. A one man army can only fight one battle at a time.
  9. Midora, I like that idea! Particularly in these cases where each frame could be a new layer. I'm sure it's a lower priority since the artists far out number the programmers.
  10. As long as it' for your own private use that's fine. Do not distribute any modifications with my name on it. You can use the algorithms as a basis for your own plugin.
  11. Uploaded v 1.0.1 to fix a bug I thought I fixed before but the code was still there. Oops Microsoft Expressions That looks like a job for Scriptlab. Your Welcome. Post Edited!!
  12. TechnoRobbo's FilmStrip make a proofsheet style image from a video V1.0.2 adds keywords and preview for The Plugin Browser V1.0.1 Fixes a with slider Menu: Effects->Photo Video found at Internet archive https://ia600405.us.archive.org/24/items/ADaysPleasure/ADaysPleasure_512kb.mp4 The Plugin and the Windows Media Player Support Files (install all 3 files in the effects folder) TRsFilmStripPlgIn.zip
  13. Yeah, maybe someone will. http://forums.getpaint.net/index.php?/topic/29718-trs-filmstrip/?p=415437
  14. Thank You, I only support and endorse downloading from this board
  15. Minor adjustment: For line art Gaussian blur then use Red Ochre's two-tone threshold to eliminate gray then adjust contrast
  16. For line art Gaussian blur then adjust contrast or use magic wand to select light grey and delete
  17. TR's Strange Attractor has been patched - will work with The Plugin Browser with out crashing. http://forums.getpaint.net/index.php?app=core&module=attach&section=attach&attach_id=8077 Thank you again mottoman and Skull Sorry for the inconvenience And thank you NN79 for educating people - us programmers tend to forget that most users aren't tech savvy
  18. Version 1.1.4 Uploaded - Form Timing Fix - works with The Plugin Browser
  19. Thanks , I know what caused it, I'll fix it this weekend. It's a strange attractor not a Plugin Browser problem. I know the fix Yes, I know - when I get to updating my plugins I'll fix that. I think one says TehcnoRobbo and the other has a copyright
  20. Hmmm. I'll Test it when I get home. Did you happen to save the details on the crash?
  21. Have look at Pyrochild's Scriptlab see if it suits your needs. Or at least some of them. http://forums.getpaint.net/index.php?/topic/6091-scriptlab/?p=84230
×
×
  • Create New...