Search the Community

Showing results for tags 'source code'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Information
    • Forum Rules
    • Paint.NET Search
    • Help Files (the official paint.net documentation)
  • Paint.NET
    • Paint.NET Discussion and Questions
    • The Pictorium
    • Tutorials - Publishing ONLY!
    • Competitions
    • Plugins - Publishing ONLY!
    • Troubleshooting & Bug Reports
  • Off-Topic
    • Grand Theory of Everything
  • Paint.NET Programming / Development
    • Plugin Developer's Central
    • paint.net 4.0 preview center
    • Translation and Localization

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


AIM


MSN


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 33 results

  1. Calendar Creator v1.4 I needed this for work, so I coded it up. And, because I'm so nice I'm sharing it with you. I'm not so nice, however, to entertain requests for format changes to the calendar itself. The drop-down list boxes default to the current month and year. Compatible with Paint.NET v4.0.6+. Includes installer batch file and dll. Version 1.4 adds option to have weeks start on Monday instead of the standard Sunday. Download Source Code This is a little too complicated for CodeLab. Visual Studio is required to build this. I whipped this together quickly and never went back to clean it up--you have been warned. If someone wants to compile this for Paint.NET v3.5.11 (won't be easy), I wouldn't mind. Here's the icon: and here's a CodeLab script: Paint.NET v3.5.11 users can download a compiled version here! Enjoy.
  2. Distort This! Effects -> Distort-> Distort This! This is an update/fork of TR's Distort This! plugin with some additional features, optimizations, and a ton of bug fixes. Change Log v2.9 (July 3, 2018) Added: Support for the Dark Theme v2.8 (Aug 4, 2017) Improved: Rendering speed is now faster, and uses less memory New: Supersample antialiasing (thanks MJW) Fixed: Clicking the 'OK' button too early no longer breaks rendering Fixed: Nubs can no longer go out of the UI bounds and become inaccessible New: There is now a visual indicator to show area outside of the 'Working Area' New: When setting the 'Working Area', the cursor is changed to a cross-hair New: The nubs can now be reset without also resetting the 'Work Area' Improved: Cleaned up the UI Fixed: Many small and subtle bugs Download DistortThis.zip Source Code https://github.com/toehead2001/pdn-tr-distort-this
  3. Radius Corners This is an continuation of @dan9298's abandoned 'Radius Fill Corners' plugin. Effects -> Stylize -> Radius Corners Features Creates rounded corners on your image at an adjustable radius. Automatically sets the maximum radius size allowed (based on half the size of the shortest side of the canvas); defaults to a quarter size Fill the background with transparency or a custom color Changelog v1.6 (July 8, 2018) Improved: Better performance when increasing the Margin value Changed: Moved the Anti-aliasing button directly under the Radius slider v1.5 (Sept 10, 2016) Added: There is now an option for a margin. v1.4 (Dec 1, 2015) Fixed: The dynamic values on the Radius slider (Max & Default) now recognize selections v1.3 (Feb 28, 2015) Added: Anti-aliasing! Changed: Plugin is now called Radius Corners (the Fill function is not important enough to be in the name ) Changed: Moved to the Stylize Submenu (same reason as above) Fixed: Right and bottom edges were off by 1px v1.2 (Feb 26, 2015) Changed: Replaced the old WinForms UI with a fancy IndirectUI one Changed: Replaced the Primary Color & Secondary Color options with a Color Wheel (which defaults to the primary color) Changed: Instead of having the default Radius Size at 50, it is now set to a quarter of the size of the shortest side of the canvas New: Metadata was added for the 'Plugin Browser' v1.1 by dan9298 (Nov 21, 2008) Prevent the radius from exceeding half the size of the shortest side of the canvas v1.0 by dan9298 (Nov 9, 2008) Initial release Download RadiusFillCorners.zip Source Code Source files and Git history
  4. Quadrilateral Correction Effects -> Tools -> Quadrilateral Correction Description This effect is useful for correcting images that have been skewed on multiple axes. It uses an algorithm from AForge.NET. It works very well, but don't expect miracles if your image is extremely skewed. Before & After The left face has been selected in the plugin. — > Screenshot Control Nubs The control nubs can be manipulated with the mouse in the following three ways: - Left Mouse Button — Grab and Drag - Middle Mouse Button — Grab and Drag with a Dead Zone - Right Mouse Button — Select nub for Keyboard Arrow manipulation - Arrow — 1px - Ctrl + Arrow — 5px Change Log v1.2 (July 3, 2018) Added: Support for the Dark Theme Changed: Moved to the 'Tools' menu v1.1 (Jan 1, 2017) Fixed: Now works properly on HiDPI v1.0 (Aug 24, 2016) Initial release Download QuadrilateralCorrection.zip Place all three files in the Effects folder Donate Source Code https://github.com/toehead2001/pdn-quadrilateral-correction Icon based on icons from Fugue Icons.
  5. Text Window Effects -> Text Formations -> Text Window Description Used to repeat text to create word images. Screenshots Notes If you do not intend to repeat the text, please use the Text tool as seen below. Change Log v1.4 (July 5, 2018) Added: Russian translation by @ReMake is now included. Changed: The Font dropdown now defaults to the Arial font, rather than the first one in the list. v1.3 (March 14, 2016) Changed: Unusable font are no longer listed in the UI, thus eliminating the "Font Error" messages. v1.2 (Oct 6, 2015) Changed: Simplified the algorithm for cutting out the window text New: Added font styles (bold, italic, underline, strikeout) Changed: Moved some code into OnSetRenderInfo. Makes it faster and use less system memory v1.1 (Aug 28, 2015) Fixed: Font error message is now modal Fixed: Background could be very slightly affected by the x Offset value if set to +1.0 (I had copy & pasted onto the wrong line without noticing...) v1.0 (Aug 25, 2015) Initial release Download TextWindow.zip Source Code Source files and Git history
  6. Tartan Effects -> Texture -> Tartan Description Provides a UI to build custom tartan/plaid patterns. The left side of the UI is the builder section. The right side of the UI is what gets rendered to the canvas. The Horizontal Set & the Vertical Set get repeated. Screenshots Images have been cropped to give more desirable edges. ---> Change Log v1.5 (July 3, 2018) Added: Support for the Dark Theme Changed: Moved to the 'Texture' menu v1.4 (Dec 12, 2016) Changed: UI Corrections & Adjustments v1.3 (Jan 22, 2016) New: There is now a preview box for the Line Style Changed: Minor UI Adjustments v1.2 (Nov 7, 2015) Fixed: Crash caused by a race condition Fixed: Was using the wrong ending-coordinate on vertical lines v1.1 (Oct 31, 2015) New: Save & Load tartan patterns Changed: Minor UI Adjustments v1.0 (Oct 22, 2015) Initial release Notes Thanks goes to @TechnoRobbo for his Color Wheel code, on which the Color Control in this plugin is based. Save & Load icons based on icons from from Fugue Icons. Download Tartan.zip Source Code Source files and Git history
  7. Barcode This is a update of @Sepcot's original Barcode generation plugin. See changelog below. Effects -> Render -> Barcode 'getpaint.net' encoded with Code 39 '93901' Postal Code encoded with POSTNET '070048016509' encoded with UPC-A Features Supports all three Code 39 barcode encodings: Code 39, Code 39 mod 43, and Full ASCII Code 39 Supports 5, 6, 9, and 11 digit POSTNET encodings Supports UPC-A encodings Automatically tries to convert text into an encodable format. (Example: "Paint" in Code 39 becomes "PAINT") Provides visual feedback for text that cannot be encoded. Uses the user defined Primary and Secondary colors to build the barcodes. Note: Barcodes built with colors other than Black (Primary) and White (Secondary) will probably not scan correctly. The width of the bars in the barcode adjust to fill the available space. No barcode is shown if the surface is too small for the barcode to be completely drawn. Supports non-rectangular selections. Note: Barcodes may not scan correctly if not rectangular. Changelog v1.5 (July 3, 2018) Added: Support for the Dark Theme v1.4 (Nov 14, 2015) Fixed: Code39 Mod43 was generating the wrong Check Digit (this has been wrong since Sepcot's first release in 2007, sorry) Changed: All barcodes render a whole lot faster now Changed: When an invalid text string is typed in, the canvas will now clear instead of the 'OK' button disabling Changed: Minor UI Tweaks, should look better on HiDPI v1.3 (Aug 24, 2015) New: Generate UPC-A barcodes New: Added option to force Black & White, rather than using the primary and secondary colors New: The 'Enter' and 'Esc' keys now work Changed: UI now has a faux IndirectUI style v1.2 (Feb 23, 2015) Fixed: Plugin would crash if Unicode characters were inputted into the text field (info) Fixed: Character validation was not functional on the 'Full ASCII Code 39' option Changed: Live preview and the 'OK' button are now disabled if invalid characters are inputted Changed: Menu entry in now under the 'Render' submenu New: Text cursor is now automatically placed in the text input field when the plugin is opened New: Metadata was added for the 'Plugin Browser' v1.1 by Sepcot (March 19, 2007) Supports 5, 6, 9, and 11 digit POSTNET encodings Supports non-rectangular selections. v1.0 by Sepcot (March 15, 2007) Initial release Download Barcode.zip Source Code https://github.com/toehead2001/pdn-barcode
  8. As requested here: https://forums.getpaint.net/topic/112938--/ Dimensions Effects > Render > Dimensions Description Render dimension arrows on your canvas. This will NOT measure anything and will NOT convert pixel length to another unit of length. Until I add this to my plugin pack, download here: Download Save to your desktop, unzip files to your desktop and run the installer batch file. Source Code: (This was a quick hack, mostly cobbled together from other plugins, and the code is ugly. You have been warned.) Versions: 1.2 7/1/2018 Fixed a bug where it would clear the canvas when OK was clicked. 1.1 7/1/2018 Text surrounded by transparency instead of white. 1.0 6/30/2018 Initial Release.
  9. TechnoRobbo's Custom Palette Matcher v1.0.5 Conforms your image colors to your custom palette by finding the nearest color match. Version 1.0.5 Fixes Crash When No Palette Directory Exists Version 1.0.4 Browser system lets you sample palettes quickly. Version 1.03 add instant preview and interpolate option Update Version 1.0.2 Shows Transparency correctly in Palette Preview. Update Version 1.0.1 Allows manually created palettes(with errors) to be parsed and used. Manually created palettes should be loaded into PDN then saved again to correct the format. TR's Custom Palette Matcher will warn you of a bad palette but will try it's best to uses what it's given.. Menu: Effects->Color Video includes palettes posted by artists on this forum topic http://forums.getpaint.net/index.php?/topic/2947-color-palettes-go-here/?p=22185 Video Tutorial : New Browser The VS Source Code The Plugin TRsCustomPaletteMatch.zip
  10. TR's Scatter Plugin A Directional Pixel Scattering filter designed to work with Layers and Transparency. Menu: Effects->Noise Version 1.3 Expanded Features Features include - longer spread distance - up to 10 layers of particles. Here's a simple tutorial on YouTube: http://youtu.be/wTShfLVD9_I The Code Hidden Content: // Submenu: Noise // Name: TR's Scatter // Title: TR's Scatter - v1.3 // Author: TechnoRobbo // URL: http://www.technorobbo #region UICode int Amount1 = 50; // [10,1000] Distance double Amount2 = 45; // [-180,180] Direction int Amount3 = 10; // [1,20] Spread double Amount4 = 50; // [0,100] Threshold int Amount5 = 1; // [1,20] Layers byte Amount6 = 0; // [255] Re-Generate #endregion void Render(Surface dst, Surface src, Rectangle rect) { dst.CopySurface(src,rect.Location,rect); double spread = Amount3 * Math.PI /180; double direction = Amount2 * Math.PI /180; double distance = Amount1; Random rndm = new Random((int)Guid.NewGuid().GetHashCode()); ColorBgra CP; double tmp; double tmp2; for (int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { for (int i=0;i<Amount5;i++){ tmp= rndm.NextDouble() * spread + direction; tmp2=Math.Pow(rndm.NextDouble(),4) * distance; double nx = x + -Math.Cos(tmp) * tmp2; double ny = y + Math.Sin(tmp) * tmp2; CP = src.GetBilinearSampleClamped((float)nx,(float)ny); HsvColor hsv = HsvColor.FromColor(CP.ToColor()); if (hsv.Value > Amount4 && CP.A > 0){ dst[x,y] = CP; } } } } } TRs Scatter.zip
  11. This is a CodeLab port of @harold's NormalMapPlus plugin. It's functionally identical, except for some fixes, the slider controls having an extra decimal place (due to the way CodeLab works), and the addition of a brief Help menu. Though the code is functionally the same, it was somewhat rewritten. It's in the Stylize submenu. The fixes are: 1) The ROI boundary pixels are handled correctly. 2) The normals are computed at the correct positions, rather than being shifted one pixel left. 3) The JIT compiler optimization crash doesn't occur. (The crash is almost certainly not due to a bug in the original plugin code, and will probably be fixed in the JIT compiler soon.) Here is the DLL (Version 1.4): NormalMapPlus.zip Here is the code: EDIT 01 AUG 1017: Moved to Stylize window. Changed version to 1.4.
  12. Graph Paper Effects -> Render -> Graph Paper Description Generates a graph with adjustable Cell Size, Group Size, and Cluster Size. Standard: Isometric: Change Log v2.1 (Feb 1, 2018) Fixed: Horizontal lines didn't fill the canvas v2.0 (Feb 17, 2016) New: Added options for Background Color and Line Colors New: Added options for Line Styles (Solid, Dashed, Dotted) Changed: Switch from IndirectUI to OptionBasedEffects v1.0 (Jan 9, 2016) Initial release Download GraphPaper.zip Place both GraphPaper.dll & GraphPaper.dlc in your Effects folder. The required 'OptionBasedLibrary v0.7.9' files can be found in the Parallel Lines and Patterns plugin. Source Code https://github.com/toehead2001/pdn-graph-paper
  13. Bulletin Board Trim Effects -> Render -> Bulletin Board Trim . . Hidden Content: UI Change Log v1.0 (July 9, 2016) Initial releaseDownload BulletinBoardTrim.zip $USD $ GBP £ EUR € JPY ¥ CAD $ AUD $ Source Code https://github.com/toehead2001/pdn-bulletin-board-trim
  14. Blur Fill Effects -> Fill -> Blur Fill Before (image surrounded by transparency): After: Features Fill the transparent area of the canvas with a scaled (fixed ratio) copy of the trimmed image. Notes Regarding the 'Position Adjust' sliders: The background is scaled at a fixed ratio to fill the canvas, thus only one dimension will be clipped and that dimension's slider is the only one that will have an affect. If the ratio of the canvas and the ratio of the trimmed image are exactly the same, no clipping will happen and thus neither slider will have an affect. Changelog v1.5.1 (Jan 16, 2018) Fixed: The effect properly disposes of it's extra surfaces now. v1.5 (Jan 13, 2018) Added: Russian translation by @ReMake is now included. Changed: Uses less memory now. v1.4.1 (Jan 17, 2017) Fixed: In some cases, the effect would crash with a Read AccessViolationException. v1.4 (Dec 31, 2016) Fixed: The bottom pixels and the right pixel were getting clipped. Changed: The panning control now uses 3 decimal places, instead of 2. v1.3 (Jan 12, 2016) New: You can now run the effect on a selection. New: Added an icon to the plugin v1.2 (Nov 7, 2015) Fixed: Effect would crash if run on an absolutely transparent canvas. v1.1 (Oct 3, 2015) New: Added a checkbox to make keeping the original image optional Changed: Moved some code into OnSetRenderInfo. Makes the effect faster and use less memory, as it no longer runs the same code over and over again v1.0 (Aug 25, 2015) Initial release Download BlurFill.zip Example - 16:9 Movie Banner Source Code Source files and Git history Icon based on icons from Fugue Icons.
  15. Rubber Stamp Effects -> Object -> Rubber Stamp Before: After: Changelog v1.0 (April 15, 2017) Initial release Download RubberStamp.zip Source Code https://github.com/toehead2001/pdn-rubber-stamp Icon from Fugue Icons.
  16. Jigsaw Puzzle Effects -> Render -> Jigsaw Puzzle Description Generates a Jigsaw Puzzle cutout of an image. Example Images Before: After: Change Log v2.2 (Jan 9, 2016) Changed: Allow the 'Scale' to go up to 10 again v2.1 (Dec 4, 2015) Fixed: Puzzle pieces would sometimes get a little distorted at low Scale values v2.0 (Nov 26, 2015) New: Automatic puzzle Dimensions and Edge pieces New: Four puzzle patterns are now available Changed: Transparent line is now the default Changed: Scale range is now capped to 5.0x; down from 10.0x v1.0 (Oct 6, 2015) Initial release Download JigsawPuzzle.zip Source Code https://github.com/toehead2001/pdn-jigsaw-puzzle
  17. Inset Box Shadow Effects -> Photo -> Inset Box Shadow Before: After(s): . . Change Log v1.2 (March 5, 2016) New: Added controls to adjust Offsets v1.1 (Feb 9, 2016) New: Added a slider control to adjust Opacity Changed: The maximum value for Margin is now set dynamically based on canvas/selection size v1.0 (Feb 8, 2016) Initial release Download InsetBoxShadow.zip Source Code https://github.com/toehead2001/pdn-inset-box-shadow Icon based on icons from from Fugue Icons.
  18. Two-point Perspective Effects -> Render -> Two-point Perspective Description Generates a Rectangular Cuboid in Two-point Perspective. Change Log v1.6 (March 27, 2017) New: Added an option to render the guide lines of the vanishing points Fixed: No more "ghost lines" when using a Fill option v1.5 (Jan 9, 2016) New: Adjustable outline Color and Width New: Fill options (None, Solid, Shaded) v1.0 (Dec 5, 2015) Initial release Download TwoPointPerspective.zip Source Code https://github.com/toehead2001/pdn-two-point-perspective
  19. Hi again! And now my 2nd plugin: Selective Toning (to be found in the 'Color' submenu) User Interface: Demo: Just before posting I saw the similarity to the "Advanced Color Replacement" plugin. I still decided to post my one here, because it features some what more configuration possibilities, a blending mode selector and the possibility to use the alpha channel. The last feature enables one to use this plugin similarly like the great "Color to Alpha" plugin. This plugin is once again entirely written using the fantastic "Code Lab" plugin -- thank you, Bolt Bait! Downloads: https://www.dropbox.com/s/xi707rcu0qf57lv/Selective_toning_v1.0a.zip?dl=0 Source files (for programmers): https://www.dropbox.com/s/qtij2zk4ex20lit/Selective Toning v1.0a Source.zip?dl=0 Best regards, Philipp
  20. HiPhiSch

    Fill Gaps v1.0

    Ok, my third plugin is something I always wanted to have. Something to fill parts deleted from an image based on the surroundings: Fill Gaps v1.0 (found in the "Render" submenu) Demo 0 -- The extreme case (Done with default parameters): Demo 1 -- The simple case (Similar colors at the border, done with default parameters): Demo 2 -- Combination with plugin "Selective Toning" (Overlap: 20, Precision: 20) User Interface: Hints on usage: * The plugin will try to fill everything transparent in the selected region. Since layers are often transparent in the outer part, make sure to additionally select only the part you want to have filled! (For instance, use the wand on the outside and press + i to invert the selection) * The calculations of the algorithm take some time. The first to sliders control quality and calculation time. Left: fast, right: slow, but better looking * The two sliders tell the plugin what it treats as transparent. The third slider is the threshold value used for what pixels should be filled. The last one is the threshold for what pixels should be considered during reconstruction. How it works: * From each transparent pixel some circles are expanded. For some points on the circle the color values are considered. The precision value is equal to two times the pixel colors used. * If colored pixeled are found the circle may still be expanded a little more, to get some more averaging over colors. The min overlap slider controls how many steps the circle will be increased, after the first pixel colors are found. * The final color value of each pixel will be the average of all relevant pixel colors. Download: https://www.dropbox.com/s/7uag7nbipp5spfo/Fill_Gaps_v1.0.zip?dl=0 Source code (for programmers): https://www.dropbox.com/s/jzko9aelxlgg9el/Fill_gaps_v1.0_source.zip?dl=0 The source code is for BoltBait's great plugin "Code Lab"! I hope you like it, Philipp
  21. Droste This is a update of @PJayTycy's original Droste distortion plugin that was left abandoned in the plugin development section of the forum. See changelog below. Effects -> Distort -> Droste Before After Changelog v1.0 by toe_head2001 (Aug 31, 2015) New: Added a control to adjust the angle of the effect. Changed: Reorganized the code to a CodeLab-like structure/style Changed: Changed plugin icon and shorted title to 'Droste' New: Added metadata for the Plugin Browser pre-v1.0 by @PJayTycy (Dec 5, 2007 - Jan 26, 2008) See thread Download Droste.zip Place both Droste.dll and MathNet.Iridium.dll in the Effects folder. Source Code Source files and Git history
  22. SubLCD This is a usability update of @xrl's original SubLCD resize plugin. See changelog below. Adjustments -> SubLCD Features Example Images Before (Actual and Zoomed-in) After (Actual and Zoomed-in) Changelog v1.2 by toe_head2001 (Jan 9, 2016) Fixed: Now works properly on selections (for real this time). Rectangular selections worked, but non-rectangular did not. Fixed: Now works when run from the 'Plugin Browser' v1.1 by toe_head2001 (Oct 9, 2015) New: Pre-resize and post-crop are no longer necessary. Simply run the plugin. New: Now works properly on selections v1.0 by xrl (Jan 15, 2008) Initial release Download SubLCD.zip Source Code https://github.com/toehead2001/pdn-sublcd
  23. Tomorrow is my birthday, but today you get the present! Remember when I wrote the Portrait plugin, MadJik wrote: 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.
  24. This plugin may be more interesting than useful (and interesting may be a matter of opinion). It's in the Effects>Object menu. Plugin: EdgeExpander.zip Quoting from the Help menu: ---------- Edge Expander expands object edges to include the pixels within a given distance of the original edge pixels. The edge consists of the pixels above an opacity threshold which border pixels below the threshold. Each expanded edge pixel is set to the color of the nearest edge pixel. The transparency depends on the distance from the edge. The controls are: Use Full Distance Range: When checked, the distance range extends to the full window. The Maximum Distance control will be disabled. Maximum Distance: Specifies the pixel distance the edge will be expanded. Fade Rate: Specifies the rate at which the pixels become transparent as they approach the Maximum Distance. Setting the rate to zero disables fading. Setting the rate to one produces a linear fade. The transparency of expanded edge pixels is determined by the Fade Rate and the transparency of the nearest edge pixel, unless the Make Pixels Above Threshold Opaque option is enabled. Opacity Threshold: Specifies the minimum alpha for object pixels. Pixels whose alphas are below this value are background pixels and are either part of the expanded edge if within the Maximum Distance, or become transparent. Make Pixels Above Threshold Opaque: When checked, pixels whose alphas are above the Opacity Threshold become fully opaque. Only Expand Edges Inside Selection: When checked, edges ouside the current selection are ignored and will not expand into the selction. ---------- The user interface: Here is a simple example using an image from toe_head2001: Original image: Image with the edges expanded with full range and zero fade rate: The plugin uses the fast NearestPixel transform discussed in the Fast algorithm for finding the minimum distances to a set thread. It's a Visual Studio project consisting of the main project and two support files. Main project: EdgeExpander.zip Support files: DistanceTransformAndHelp.zip Though the plugin was mostly written as an experiment, I can think of a few possible uses for it, including softening edges for antialiasing and as a sort of more flexible Crystallize effect, which I'll explain in a follow-up comment.
  25. Postage Stamp Effects -> Render-> Postage Stamp Before After(s) With the Mat option. The Drop Shadow plugin by @KrisVDM was run afterwards. The Outline option is useful for when you're going to manually tile the stamp: . Note When you manually tile the stamps, the edges match up without any perforation holes. Therefore, the "perforations" obviously are not simulating real perforations. This plugin instead simulates modern postage stamps, and was modeled after the stamps produced by the USPS here in the USA. I may add the old-fashion perforation styles at a later time. Change Log v1.1 (March 27, 2017) Improvement: The outer edges of the stamp render slightly better v1.0 (May 23, 2016) Initial release Download PostageStamp.zip Source Code https://github.com/toehead2001/pdn-postage-stamp Icon from from Fugue Icons.