BoltBait Posted November 2, 2009 Share Posted November 2, 2009 Tomorrow is my birthday, but today you get the present! Remember when I wrote the Portrait plugin, MadJik wrote: MadJik said: Another good plugin :plugin: ! I like it ! Thanks... =>joke : ETA for Landscape plugin ? Well, ETA is TODAY! It automates a bunch of steps that I make when fixing landscape pictures. It is obviously not right for everything, but I find it useful. Hopefully you will too. Download the Landscape.dll as part of my plugin pack here: https://forums.getpaint.net/index.php?/topic/32048-v If you have trouble installing this plugin, post your troubles here. Enjoy. For those that are interested in such things, here is the CodeLab source: // Author: BoltBait // Submenu: Photo // Name: Sharpen Landscape // URL: http://www.BoltBait.com/pdn #region UICode Pair<double, double> Amount1 = Pair.Create( 0.0 , -0.25 ); // Position of Horizon int Amount2 = 50; // [0,100] Sky int Amount3 = 50; // [0,100] Grass int Amount4 = 100; // [0,200] Sharpen int Amount5 = 50; // [0,100] Saturation int Amount6 = 50; // [0,100] Final Multiply Adjustment #endregion // Setup for using the various blend ops private UserBlendOps.OverlayBlendOp overlayOp = new UserBlendOps.OverlayBlendOp(); private UserBlendOps.ColorDodgeBlendOp dodgeOp = new UserBlendOps.ColorDodgeBlendOp(); private UserBlendOps.MultiplyBlendOp multiplyOp = new UserBlendOps.MultiplyBlendOp(); private UnaryPixelOps.HueSaturationLightness saturationOp; unsafe void Render(Surface dst, Surface src, Rectangle rect) { Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); ColorBgra Sky = ColorBgra.FromBgr(255,128,0); ColorBgra Grass = ColorBgra.FromBgr(0,128,0); int HorizonRow = (int)Math.Round(((Amount1.Second + 1) / 2) * (selection.Bottom - selection.Top)); saturationOp = new UnaryPixelOps.HueSaturationLightness(0, 100+Amount5*3, 0); // Setup for calling the Blur function GaussianBlurEffect blurEffect = new GaussianBlurEffect(); PropertyCollection bProps = blurEffect.CreatePropertyCollection(); PropertyBasedEffectConfigToken bParameters = new PropertyBasedEffectConfigToken(bProps); bParameters.SetPropertyValue(GaussianBlurEffect.PropertyNames.Radius, 1); blurEffect.SetRenderInfo(bParameters, new RenderArgs(dst), new RenderArgs(src)); // Call the Blur function blurEffect.Render(new Rectangle[1] {rect},0,1); // Now in the main render loop, the dst canvas has a blurred version of the src canvas for (int y = rect.Top; y < rect.Bottom; y++) { ColorBgra* srcPtr = src.GetPointAddressUnchecked(rect.Left, y); ColorBgra* dstPtr = dst.GetPointAddressUnchecked(rect.Left, y); for (int x = rect.Left; x < rect.Right; x++) { // Create a blue gradient at the top if (y < HorizonRow) { Sky.A = (byte)(int)((255.0 - (255.0 * y / HorizonRow ))*(Amount2/100.0)); } else { Sky.A = (byte)0; } // Create a green gradient at the bottom if (y > HorizonRow) { Grass.A = (byte)(int)((255.0 * (y-HorizonRow) / (selection.Bottom-HorizonRow))*(Amount3/100.0)); } else { Grass.A = (byte)0; } ColorBgra AdjustmentPixel = *dstPtr; ColorBgra SourcePixel = *srcPtr; // Sharpen (unsharp mask) double NewR = (double)SourcePixel.R + ((double)SourcePixel.R - (double)AdjustmentPixel.R) * (double)Amount4 / 100.0; double NewG = (double)SourcePixel.G + ((double)SourcePixel.G - (double)AdjustmentPixel.G) * (double)Amount4 / 100.0; double NewB = (double)SourcePixel.B + ((double)SourcePixel.B - (double)AdjustmentPixel.B) * (double)Amount4 / 100.0; AdjustmentPixel.R = Utility.ClampToByte(NewR); AdjustmentPixel.G = Utility.ClampToByte(NewG); AdjustmentPixel.B = Utility.ClampToByte(NewB); // Boost the saturation *dstPtr = saturationOp.Apply(AdjustmentPixel); // Add in the sky and grass *dstPtr = multiplyOp.Apply(*dstPtr, Sky); *dstPtr = dodgeOp.Apply(*dstPtr, Grass); // Finally, add a little "punch" to the overall picture AdjustmentPixel = *dstPtr; AdjustmentPixel.A = (byte)(int)(Amount6 * 255.0 / 100.0); *dstPtr = multiplyOp.Apply(*dstPtr, AdjustmentPixel); srcPtr++; dstPtr++; } } } Thanks to Tanel for the Sharpen (unsharp mask) code. 3 Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
barkbark00 Posted November 2, 2009 Share Posted November 2, 2009 Very interesting! Suggestions: Add horizon angle. Add horizon tube distortion, like MadJiks... Add horizon line overlay option. To line up horizon settings with image while previewing. Quote Take responsibility for your own intelligence. 😉 -Rick Brewster Link to comment Share on other sites More sharing options...
BoltBait Posted November 2, 2009 Author Share Posted November 2, 2009 *sigh* no one's ever satisfied. Why do I even bother? "Here I am, brain the size of a planet, and they ask me to take you to the bridge. Call that job satisfaction, 'cause I don't." ~Marvin Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
barkbark00 Posted November 2, 2009 Share Posted November 2, 2009 Yeah, I guess that was a little soon for feature requests... Sorry Boltbait! I do think it is very cool as is! Quote Take responsibility for your own intelligence. 😉 -Rick Brewster Link to comment Share on other sites More sharing options...
Lance McKnight Posted November 3, 2009 Share Posted November 3, 2009 :shock: This will be one sweet plugin for some of my photographs! downloads Ideas are swimming in my heads. Cheers, BB! Edit: Have one on me, mate. Quote Officially retired from this forum. Have a nice day. Link to comment Share on other sites More sharing options...
theonlychad Posted November 3, 2009 Share Posted November 3, 2009 wow thanks boltbait looks sleek and sexy Quote "Clearly it's a very serious and literal meaning. If you're not solving physics equations then get off my lawn!-Rick Brewster Paint.net Lead Developer" Link to comment Share on other sites More sharing options...
pipp92 Posted November 3, 2009 Share Posted November 3, 2009 thx a lot boltbait and happy birthday Quote Personal Gallery Link to comment Share on other sites More sharing options...
Boude Posted November 3, 2009 Share Posted November 3, 2009 Happy birthday, Santa Claus (you give gifts on your birthday). Quote History repeats itself, because nobody was paying attention the first time. Link to comment Share on other sites More sharing options...
007 Nab Posted November 3, 2009 Share Posted November 3, 2009 Thanks for the new plugin BoltBait! - and happy birthday Quote "pyrochild, you're my favorite person ever. We should go snowboarding some time."~ 007 Nab. Ish. PDN Gallery | I Made a Deviant Art! Link to comment Share on other sites More sharing options...
HELEN Posted November 3, 2009 Share Posted November 3, 2009 That's a very nice plugin. Amazing! Quote Don't spit into the well, you might drink from it later. -----Yiddish ProverbGlossy Galaxy Ball---How to Make FoliageMy Gallery PDN Fans--My DA Link to comment Share on other sites More sharing options...
oma Posted January 21, 2010 Share Posted January 21, 2010 I really like this plugin. BoltBait is there any way to have a tilt option for the horizon line? sometimes the horizon just isn't smack dab across the screen in straight line. the work around I've been using is larger canvas and rotating the image then applying plugin then re righting the picture. not absolutlely ideal. but only way I can think to do this. is there another method I'm not thinking of? ciao OMA 1 Quote My Deviant Art Gallery Oma's Paint.Net gallery Link to comment Share on other sites More sharing options...
BoltBait Posted January 21, 2010 Author Share Posted January 21, 2010 Thanks. I'll think about it and see what I can do. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
oma Posted January 21, 2010 Share Posted January 21, 2010 no rush its not a major need ,just thought it would be a nice option. I've a few things perking away in the back of my noodle that I might experiment with if there was a tilt or rotational feature. ciao OMa Quote My Deviant Art Gallery Oma's Paint.Net gallery Link to comment Share on other sites More sharing options...
Gamer_World14 Posted August 16, 2010 Share Posted August 16, 2010 Sorry BoltBait, I know this plugin is older, but the link is broken to download this plugin. Could you update this one please. Thanks, and it would be much appreciated! Quote deviantART | Paint.NET Gallery | bennettfrazier.com <-- (My new Website!) Link to comment Share on other sites More sharing options...
pyrochild Posted August 16, 2010 Share Posted August 16, 2010 fixed Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
Gamer_World14 Posted August 16, 2010 Share Posted August 16, 2010 Thanks Pyro. Quote deviantART | Paint.NET Gallery | bennettfrazier.com <-- (My new Website!) Link to comment Share on other sites More sharing options...
ingwer Posted May 28, 2017 Share Posted May 28, 2017 Thank you BoltBait for this wonderful plugin. It reminds me of the good old picture postcards. On YT, but in German only: Sharpen Landscape 2 Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted May 28, 2017 Share Posted May 28, 2017 On 11/2/2009 at 2:26 PM, BoltBait said: *sigh* no one's ever satisfied @BoltBait I thank you for posting the code so I can compile it myself (Slowly learning) even though it is the older version - gives me a challenge to correct it as it is now out of date. Another video to watch too. Thank you @ingwer 1 Quote Link to comment Share on other sites More sharing options...
xod Posted May 28, 2017 Share Posted May 28, 2017 In CodeLab: 1. CTRL+I and click on Update (the selected control) 2. Replace the original code: AdjustmentPixel.R = Utility.ClampToByte(NewR); AdjustmentPixel.G = Utility.ClampToByte(NewG); AdjustmentPixel.B = Utility.ClampToByte(NewB); with AdjustmentPixel.R = Int32Util.ClampToByte((int)NewR); AdjustmentPixel.G = Int32Util.ClampToByte((int)NewG); AdjustmentPixel.B = Int32Util.ClampToByte((int)NewB); 1 Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted May 28, 2017 Share Posted May 28, 2017 Thank you @xod. That helped. Quote Link to comment Share on other sites More sharing options...
Seerose Posted May 29, 2017 Share Posted May 29, 2017 (edited) Dear @ingwer! Thank you very much for the video and for your effort, it's helped me. *PS: The photo belongs to me. Edited April 19, 2018 by Seerose 2 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...
ingwer Posted May 29, 2017 Share Posted May 29, 2017 (edited) Thank you - Andrew, xod and Seerose! It's just great, dear Seerose to see your immediate result of my little plugin tutorial. It makes me happy Edited May 29, 2017 by ingwer 1 Quote Link to comment Share on other sites More sharing options...
Sakana Oji Posted January 3, 2019 Share Posted January 3, 2019 Since you created CodeLab in the first place, could you teach me how to apply two effects in a plugin? I'm working on a HDR plugin and I'm trying to add a "Brightness/Contrast" effect to it before the "Gaussian Blur" effect - but I seem to get errors. Any tips and help? Quote Big McThankies From McSpankies! Link to comment Share on other sites More sharing options...
ReMake Posted January 3, 2019 Share Posted January 3, 2019 Maybe this will help: How it's made (Sponge effect) Quote Link to comment Share on other sites More sharing options...
Cakie67 Posted February 19, 2021 Share Posted February 19, 2021 Where can I find the "download " for this landscape -Plugin? I lost all my plug ins when I HAD to upgrade from Windows7 to W10. I could not find the plug in paks I used when I first Downloaded Paint.net. I am trying to find them all. Why is everything changing making it a daily hourly search? Any help would be appreciated. Thanks Here is one of my Designs. It is Day 6 of the creation, and God has just created the Elephant, the male and his female. I love art work. Paint.net is the Best tool on the market. I really need my Plug -ins. Cakie67 Quote 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.