Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

HiPhiSch's Achievements


Apprentice (3/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges



  1. Sorry for taking away the "Kill Color" name first. I would really be interested in the source code if possible. Nice plugin!
  2. I am afraid that Paint.NET at the current state is the right tool for this task, since it does not possess batch functions right now. One cannot write an effect/adjustment plugin which is conform to the rules and resizes an image. It could be written as an IO plugin though, but would not make much sense. You still would have to open each file and then save it. Maybe use Paint.NET for editing (before/afterwards) and take a look at the image magick suite for the resizing part. (Free command line tools, that are designed to do such kind of batch jobs -- like resizing and compressing). Don't get me wrong, Paint.NET is awesome, but it simply does not fit your needs at the moment.
  3. Description: This plugin removes a color from the selected part of the image and tries to find a substitution for it by analyzing the surrounding parts. Download: https://www.dropbox.com/s/exmcdhpt35e07j5/Kill_color_v1_1.zip?dl=0 Source code (for programmers): https://www.dropbox.com/s/wgaptwrkqyz68pf/Kill Color_source_v1_1.zip?dl=0 Changelog v 1.1: * BUGFIX: "Tone Amount" now working as supposed * New option "Keep only pixels that changed" added => very useful duplicate layer first, use plugin on new layer with this option checked * Source Code is now available * Tweaks in how "Tolerance" and "Tone Amount" are working. Screenshots: Example 1: (Parameters for this one: Color (R, G, : 190, 189, 187 (Picked with :ColorPicker: from the image first) Tolerance: 30 (for v1.1: maybe ~70) Tone Amount: 30 (for v1.1: 100, a bug was preventing toning in v1.0) Radius: 40 Precision: 20 Relevance of Proximity: 60 (Less blurry) Relevance of Colordifference: 60 Weight (Replacement): 40 Weight (Selection): 25 (Low saturation is more important than brightness) Assume Transparency: 0 (The fence is solid and has no blurred out edges) ) Example 2: (Properties for this example: Color (R, G, : 38, 127, 0 (Picked with :ColorPicker: from the image first) Tolerance: 0.01 (Just one color used) (still o.k. for v1.1) Tone Amount: 30 (would be 100 in v1.1 (toning was not working in v1.0)) Radius: 40 Precision: 20 Relevance of Proximity: 60 (Less blurry) Relevance of Colordifference: 60 Weight (Replacement): 50 Weight (Selection): 50 Assume Transparency: 0 (Splatters aren't transparent) ) User Interface: Hints on Usage: * Select a color first * Tone amount and tolerance let you control on how much the image is altered. A bigger tone amount causes similar color tones to be stronger affected. Tolerance defines a minimum change in the color so that the pixel is affected at all. * Radius and precision affect how many pixels in the surrounding of the altered pixel are used to estimate a replacement color. * Relevance of colordifference and proximity settings affect how the replacement color is estimated. A large value for the first one will give stronger weight to colors with a larger difference in color and intensity. Setting the second one to a larger value will give the direct surrounding a higher weight for the replacement color. * The weight (color <-> intensity) sliders influence what is considered more important as difference. 50 will give a balanced weight, 0 will just look at the tone and 100 at the lightness. The selection property influences which pixels are affected, the replacement option influences how the pixel in the surrounding (used for replacement) are weighted. * Assume transparency can be used if the surrounding is toned a bit with the color. * The "keep only pixel which are altered" option (v1.1, scroll down to see it) will only keep pixel that are affected by the algorithm. The remaining pixels are set as transparent. Also instead of toned pixel color, the alpha is set to a corresponding value. This makes it easier to modify the outcome in a second step afterwards. * The algorithm includes converting RGB values to CIELab values. This is time consuming and therefore the plugin tries to cache the whole image in CIELab values during initialization. If this is not possible (low on memory) the plugin will still work but get significantly slower. To speed up a bit aliasing will then be performed for RGB and one conversion with this bilinear sample will be used for calculation. If you remove the check from the checkbox you can set the plugin to do the aliasing after CIELab conversion. This will slow down the calculation with probably a factor two or three but the resulting image is identical to what you get, if caching were possible. Suggestions: * Duplicate the layer first and use the "keep only pixel which are altered" (since v1.1). Effects (like a Gaussian blur and correction of areas youd don't want to be affected, can than easily be achieved) * Don't increase radius too much if not necessary (e.g. for larger areas of the color you want to remove). The result will become much more blurry and it takes longer. * For images with low structure decrase the relevance of proximity and increase it if the altered parts look blurry. * If the replaced color has some strange toning you probably assumed too much (or less likely too few) transparency. * Play around with the two weighting sliders (and tone amount/tolerance, relevance of colordifference). I first tried it out at some selected parts of the image and afterwards applied the effect to the whole image. Technical Details: * CIELab is used to compare colors and calculate colors. Therefore the plugin tries to cache the image in CIELab format. * The color you want to kill is compared with the pixel colors. The difference in combination with the tone amount value determines the change of a pixel. If the difference is below the tolerance value (some scaling is involved here) the pixel will stay. * Precision and radius determine a number of pixels surrounding the pixel that should be changed. A weighted average of the color is determined. The weight is calculated from a distance factor, a color difference factor, and the alpha value. * The distance factor is something between one (relevance of proximity zero) and pow(distance,-3). (Calculation is discrete for speed reasons, no Math.Pow() involved) * The color difference factor is determined by difference(ColorToKill, ColorFromSurroundingPixel). Weight(color <-> intensity) and relevance of colordifference have an influence on this function. * The source is not documented and quite messy. If you are interested nevertheless just p.m. me. I plan to rework it a little and put it online later on. The source is now available. Grab it if you are intersted. Future plans: * Optimize the loop structure, for better memory access => increased speed. * Optimize the bilinear interpolation, that transparent pixel will be excluded already for the bilinear filtered values. * A CUDA implementation (seems to be possible from first tests, but will probably take some time for me to write it) Have fun, Philipp Schäfer
  4. There is no need to search for it on rapidshare. It is linked as a downloadable zip archive in my first post. Just click on it and download it.
  5. Hi all! I tried to access the Clipboard in the OnRender section with this: IDataObject idat; lock(this) { idat = Clipboard.GetDataObject(); } // idat == null <- this happens every time I used a try block before, the simplified code is just for testing. There is no exception thrown, but I always just get the null, no matter what is stored inside of the clipboard. I also included a demand for UIPermission including AllClipboard. This does not help. I am using VS2008 pro if that matters. Is it somehow possible to read content from the clipboard? I hope you can help me out.
  6. 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: > > Fill_Gaps_v1.0.zip < < 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
  7. 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
  8. Thanks a lot! @LFC4EVER: UI Screenshot has been added.
  9. Hi everybody! After browsing for some plugins and finally taking a look at "Code Lab", I eventually decided to create my own plugin: (to be found in the "Color" submenu) *Updated V1.1* Blending Modes directly applicable Download: https://www.dropbox.com/s/o10l8o28xcc3n51/selective_enhancement_v1.1.zip?dl=0 Source code (for programmers): https://www.dropbox.com/s/dkf5x9ohhtchzvl/selective_enhancement_source_1_1.zip?dl=0 It will spread out or push together colors close to the selected one and was useful for some of my manipulations. The two following pictures show the effect. You can also get some nice contrast enhancement by choosing black as the base color something like ~-10 for the enhancement factor and some playing around with "Black (Input)" and "White (Input)". User Interface: Demo 1: Demo 2: (uses blend mode "color burn" and reduced "White (Output)" value) Demo 3: (in hints under "poppy effect" is explained how to get this) Hints on usage: * Basic idea: Select a color, slide enhancement slider and then slide input black and white sliders closer together * Tone an image: Select a color, slide enhancement slider to negative values. * Contrast enhancement: Select black or white and slide enhancement slider to negative values. If black is selected slide input white to the left, if white is selected slide input black to the left. * Contrast enhancement 2: Slide color to a medium grey and enhancement slider to positive values. Slide input black and white more towards the middle. * Some poppy effect: Select a saturated color opposite to the effect color you want. Slide enhancement to high values. * Blending: Play around with the output white slider, too. It has the analogue function for blending, as the slider in layer blending options. Outline of how it works: * Pixel RGB values are converted to double precision floating point values from 0.0 to 1.0 * Selected color is then subtracted, sign and value stored separately * A power function with exponent depending on the enhancement slider is applied. This pushes the pixel color towards or away from the selected color * The modified offset is applied to the selected base color * The input black and white values are used to cut out a range of colors and scale the to the output colors (like some basic histogram change), (conversion back to integer is performed afterwards!) * Output colors are blended to original image (if box is checked) I hope you like my first post, :wink: best regards, Philipp
  • Create New...