TechnoRobbo Posted October 3, 2014 Share Posted October 3, 2014 TechnoRobbo's Intense Filtration v 1.3 PDN 3.5 compatible Based on a Topic conversation about Hue It's not a hue adjustment it's a color filter and augmenter v1.3 has an anti-clipping algorithm Menu: Effects->Color Demo Video CodeLab Source Code Hidden Content: // Submenu: Color // Name: TR's Intense Filtration // Title: TR's Intense Filtration- v1.3 // Author: TechnoRobbo // URL: http://www.technorobbo.com #region UICode int Amount1 = 4700; // [0,5999] Hue double Amount2 = .90; // [0,2] Gain int Amount3 = 0; // [0,2000] Filter Intensity byte Amount4 = 0; // [1] Fade To -|Base Image|B&W|Hue #endregion void Render(Surface dst, Surface src, Rectangle rect) { // Delete any of these lines you don't need Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); int CenterX = ((selection.Right - selection.Left) / 2)+selection.Left; int CenterY = ((selection.Bottom - selection.Top) / 2)+selection.Top; ColorBgra PrimaryColor = (ColorBgra)EnvironmentParameters.PrimaryColor; ColorBgra SecondaryColor = (ColorBgra)EnvironmentParameters.SecondaryColor; int BrushWidth = (int)EnvironmentParameters.BrushWidth; float[,] hues = {{1,0,0,1,1,0}, {1,1,0,0,1,0}, {0,1,0,0,1,1}, {0,1,1,0,0,1}, {0,0,1,1,0,1}, {1,0,1,1,0,0}}; ColorBgra CP; for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; for (int x = rect.Left; x < rect.Right; x++) { float coeff = (float)Amount2; float mix =1f - (float)Amount3 / 2000f ; //hues int hueIdx= Amount1/1000; float hueshift = (float)(Amount1 % 1000)/1000f; float r,g,b; r = hues[hueIdx ,3] * hueshift + hues[hueIdx,0] - hues[hueIdx,0] * hueshift ; g = hues[hueIdx ,4 ] * hueshift + hues[hueIdx ,1] - hues[hueIdx ,1] * hueshift ; b = hues[hueIdx ,5] * hueshift + hues[hueIdx , 2] - hues[hueIdx , 2] * hueshift ; CP = src[x,y]; //hue filtration * gain float tmpr = (float)CP.R * coeff * r; tmpr = (tmpr > 255) ? 255: tmpr; float tmpg = (float)CP.G * coeff * g; tmpg = (tmpg>255) ? 255: tmpg; float tmpb = (float)CP.B * coeff * b; tmpb = (tmpb>255) ? 255: tmpb; //grayscale float gray = (float)(CP.R + CP.G + CP.B)/3f * coeff ; gray = (gray >255) ? 255: gray ; //base image * gain float thresh = (coeff>1) ? 128: 255 ; float himax = 255f * coeff - thresh ; float CPR = (float)CP.R * coeff; CPR = (CPR >thresh ) ? (CPR - thresh ) * (255-thresh) /himax + thresh : CPR; float CPG = (float)CP.G * coeff; CPG = (CPG >thresh ) ? (CPG - thresh ) * (255-thresh)/himax + thresh : CPG; float CPB = (float)CP.B * coeff; CPB = (CPR >thresh ) ? (CPB - thresh ) * (255-thresh)/himax + thresh : CPB; //gray * gain float graymix = gray/255f; float gr = r * graymix * 255 * coeff ; gr = (gr >255) ? 255: gr ; float gg = g * graymix * 255 * coeff ; gg = (gg >255) ? 255: gg ; float gb = b * graymix * 255 * coeff ; gb = (gb >255)? 255: gb ; if (Amount4==0) { tmpr = CPR * mix + tmpr - tmpr * mix; tmpg = CPG * mix + tmpg - tmpg * mix; tmpb = CPB * mix + tmpb - tmpb * mix; }else if (Amount4==1){ tmpr = gray * mix + tmpr - tmpr * mix; tmpg = gray * mix + tmpg - tmpg * mix; tmpb = gray * mix + tmpb - tmpb * mix; }else if (Amount4==2){ tmpr = gr * mix + tmpr - tmpr * mix; tmpg = gg * mix + tmpg - tmpg * mix; tmpb = gb * mix + tmpb - tmpb * mix; } CP .R = (byte)tmpr; CP .G = (byte)tmpg; CP .B = (byte)tmpb; CP.A = (byte)CP.A; dst[x,y] = CP; } } } TRsIntenseFilteration.zip 4 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...
nitenurse79 Posted October 3, 2014 Share Posted October 3, 2014 Nice filtration work Mister Techno Robbo Thank you. Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted October 3, 2014 Author Share Posted October 3, 2014 Why thank you Miss NiteNurse79. 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 October 3, 2014 Share Posted October 3, 2014 This looks fun and useful - many thanks! Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
Nai Posted October 4, 2014 Share Posted October 4, 2014 Where is the download link ? Quote Link to comment Share on other sites More sharing options...
null54 Posted October 4, 2014 Share Posted October 4, 2014 Where is the download link ? The zip file is attached to the bottom of the first post. Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
TechnoRobbo Posted October 4, 2014 Author Share Posted October 4, 2014 Posted Today, 07:56 PM Nai, on 03 Oct 2014 - 7:48 PM, said: Where is the download link ? The zip file is attached to the bottom of the first post. It is now, Nai I was updating to version 1.1 a few minutes ago and you may have seen at at the wrong moment when I hadn't uploaded the update. 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...
Nai Posted October 4, 2014 Share Posted October 4, 2014 Thanks ! Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted October 4, 2014 Author Share Posted October 4, 2014 V 1.3 ready for download - eliminates color clipping artifact. oh and a video demo POST EDIT: V1.3 source code updated 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...
Seerose Posted October 6, 2014 Share Posted October 6, 2014 TechnoRobbo! I have not been here 2 weeks and so many new beautiful things. Great work, thank you so much. 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...
barbieq25 Posted October 6, 2014 Share Posted October 6, 2014 Looks great! Thanks again for all the wonderful plugins that you write & share with us. Very much appreciated 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 October 6, 2014 Author Share Posted October 6, 2014 Seerose & Barbie, thank you, your too kind. 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...
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.