Red ochre Posted August 24, 2013 Share Posted August 24, 2013 Scintillate: Alternately inverts the colours of an image in a tiltable pattern. At small sizes gives a strange moving effect that will probably give you migraine!Good results on spectrum gradients and interesting patterns when run repeatedly (with different settings) on the same image.Note: Image resoloution affects the 'scintillation' and jpeg compression generally wipes it out. Also resizing down is problematic. These images will probably change if you resize your browser.Have fun!Found under Effects/Stylize. Dll name = scintillate.Nearly forgot the code: Hidden Content: /* =================================================== */ /* */ /* Scintillate */ /* (c) 2013 Red Ochre */ /* */ /* Description: inverts alternating pixels */ /* */ /* ========================================== ======== */ // Name: Scintillate // Author: Red ochre (John Robbins) // Submenu: Stylize // URL: http://www.getpaint.net/redirect/plugins.html // Title: Scintillate Aug 2013 Red Ochre #region UICode byte Amount1 = 0; // [1] Pattern|alternate squares|micro-lattice double Amount2 = 0; // [0,90] Angle int Amount3 = 20; // [1,100] Size bool Amount4 = false; // [0,1] Offset pattern bool Amount5 = false; // [0,1] Invert alpha #endregion void Render(Surface dst, Surface src, Rectangle rect) { Rectangle sel = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); int H = sel.Bottom - sel.Top; int W = sel.Right - sel.Left; ColorBgra cp; // current pixel int B,G,R,A; double angle = Math.PI * Amount2/180; int K = Amount3; double deg90 = Math.PI /2; double sina = Math.Sin(angle); double sinb = Math.Sin(deg90 - angle); double cosa = Math.Cos(angle); double cosb = Math.Cos(deg90 - angle); int Ox = (int)(sel.Left + (W/2)); int Oy = (int)(sel.Top + (H/2)); for (int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { cp = src[x,y];B = cp.B;G = cp.G;R = cp.R;A = cp.A; int cX = x - Ox; int cY = y - Oy; double X = ((cX * cosa) + (-cY * cosb));//will be +ve and -ve double Y = ((cX * sina) + (cY * sinb)) ; if(angle == 0){X = cX;Y = cY;}//to get around odd pattern caused by inaccuarcy in trig funcs? X = X/K;Y = Y/K;//grid size bool Inv = false; if(Y < 0){Y = -Y + 1;} if(X < 0){X = -X + 1;} switch(Amount1) {case 0: if(Y%2 < 1){X = X + 1;} if(X%2 < 1){Inv = true;} break; case 1: if(X%2 < 1||Y%2 < 1){Inv = true;} break; } if(!Amount4 && Inv){B = 255 - B;G = 255 - G;R = 255 - R;if(Amount5){A = A - 255;}} if(Amount4 && !Inv){B = 255 - B;G = 255 - G;R = 255 - R;if(Amount5){A = A - 255;}} // re assemble cp = ColorBgra.FromBgra( Int32Util.ClampToByte(, Int32Util.ClampToByte(G), Int32Util.ClampToByte(R), Int32Util.ClampToByte(A)); dst[x,y] = cp; } } } 2 Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted August 25, 2013 Share Posted August 25, 2013 Interesting effect! Thanks Red. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
DrewDale Posted August 25, 2013 Share Posted August 25, 2013 Looks good cheers Redochre Quote Link to comment Share on other sites More sharing options...
Pixey Posted August 25, 2013 Share Posted August 25, 2013 Oooo - a new toy to play with I thank you and am off to play . Quote How I made Jennifer & Halle in Paint.net My Gallery | My Deviant Art "Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon. Link to comment Share on other sites More sharing options...
barbieq25 Posted August 25, 2013 Share Posted August 25, 2013 Looks like fun! Thanks Red! Quote Knowledge is no burden to carry. April Jones, 2012 Gallery My DA Gallery Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 26, 2013 Share Posted August 26, 2013 tres moire Very Cool Dude! Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
Red ochre Posted August 26, 2013 Author Share Posted August 26, 2013 EER, Drew',Pixey, BBQ & TR - many thanks for the support! EER & TR - no-one has noticed my deliberate mistake in the code yet? Hidden Content: (I didn't invert the alpha correctly - really makes no difference as A = 0 is probably all that's needed.) Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
Seerose Posted September 19, 2013 Share Posted September 19, 2013 Many thanks... Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi Link to comment Share on other sites More sharing options...
david.atwell Posted September 19, 2013 Share Posted September 19, 2013 Seerose, this is an English only forum. We mean no disrespect, but the moderators are all English speakers and it's more difficult to moderate posts in other languages. I translated your post, but please keep that in mind in the future. Quote The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.Amy: But how did it end up in there?The Doctor: You know fairy tales. A good wizard tricked it.River Song: I hate good wizards in fairy tales; they always turn out to be him. Link to comment Share on other sites More sharing options...
Seerose Posted September 22, 2013 Share Posted September 22, 2013 Seerose, this is an English only forum. We mean no disrespect, but the moderators are all English speakers and it's more difficult to moderate posts in other languages. I translated your post, but please keep that in mind in the future. Okay, thank you. Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.