Jump to content

BoltBait

Administrator
  • Posts

    15,730
  • Joined

  • Last visited

  • Days Won

    405

Everything posted by BoltBait

  1. If you plan to use such a picture here as your profile image, one of the mods will just delete it. We really don't allow animated images in profile pictures.
  2. You can easily tell if some other software is messing with Paint.NET by starting your computer in "Safe Mode". Once that's done, try running Paint.NET. If it runs fine, the problem is somewhere else.
  3. One of my plugins has a different default based on the size of the image. protected override PropertyCollection OnCreatePropertyCollection() { List<Property> props = new List<Property>(); if (EnvironmentParameters.SourceSurface.Width < 1000) { props.Add(new Int32Property(PropertyNames.Amount1, 10, 0, 100)); } else { props.Add(new Int32Property(PropertyNames.Amount1, 50, 0, 100)); } return new PropertyCollection(props); } That answers half your question. I don't know about filetype plugins; I've never made one.
  4. Shouldn't this be: start paintdotnet:"%1 %2 %3 %4 %5 %6 %7 %8 %9" That way, if there are spaces in the filename, the command parameters will be caught by the 2nd, 3rd, etc. parameters. (I'm assuming that Paint.NET will trim the filename.)
  5. What is your screen geometry? For example: 1024x768 100% or 3840x2160 200%
  6. OK, you convinced me. I've made a new build and replaced the one in the original post.
  7. Install my plugin pack. In it, you'll find "Adjustments > Transparency" which will do what you want. Install pyrochild's Curves+ plugin. It can do all sorts of stuff like this. Never presume. Seriously, the source code to Paint.NET is a complicated beast. Adding even the simplest function is sometimes quite complicated. Rick, the developer, has to balance the difficulty of adding a feature by how many people will use it. It seems to me that you're not using plugins. If that's true, you're missing out on half the power of Paint.NET. After installing my plugin pack (link in sig), try looking around the plugin forum for other cool stuff. Plugins really are the icing on the Paint.NET cake.
  8. I’m pretty sure it is in the Adjustments menu. It’s just that there isn’t a “//comment” for that.
  9. When saving the png file, on the screen after specifying the file name, make sure to select a bit depth of Auto select.
  10. To get the right shade, you could use Effects > Blurs > Gaussian blur. Of course, you’ll lose all your sharp edges. So this will be a challenge. (You'd have st select all areas you want to be shaded first.)
  11. OK, I'm not sure why you don't have this option: But, go into the Program Settings tab and specify this:
  12. I'm trying to use my ESP to read your mind, but it's not working... perhaps you could show us a screenshot of what you're seeing?
  13. NVIDIA control panel. → 3D Settings Management. → Selected graphics processor. Change to: "Auto-select
  14. What does this have to do with Paint.NET? I'll tell you: Nothing! Since this is a forum dedicated to Paint.NET and it is NOT a general support forum, I'm closing this thread. Go ask your question over at StackOverflow.com and I'm sure someone will help you.
  15. When Rick said that he was planning to add it to 4.0, he means some time after 4.0 ships and before 5.0 ships. This thread is old, I'm closing it. Please read the forum rules (link at top/bottom of every page).
  16. If you're NOT holding down the Ctrl, Alt, or Shift... everything works fine.
  17. Please try this plugin and see if it works better for you: https://forums.getpaint.net/topic/28520-print-it-tools-effect/
  18. OK, I've updated the help file and rebuilt the dll. Moved back to the plugin forum.
  19. Got them from Wikipedia: https://en.wikipedia.org/wiki/Grayscale Looking at the code, Paint.NET actually uses these numbers: 0.299 * Red + 0.587 * Green + 0.114 * Blue I will update my code to use these numbers instead of the Wikipedia page's values. NOTE: Moving this to the Dev Center until the bugs are worked out... Edit: I have corrected the algorithm above. Now, the algorithm is matching what Paint.NET used to do. Newer Paint.NET versions use a GPU enhanced version of the Black and White algorithm, and even though the numbers are the same, the results are SLIGHTLY different. But, the CodeLab script above is solid and I will republish tonight once I update the built-in help file.
  20. Black and White+ version 1.1 Black and White+ includes 3 different algorithms to convert a color image into a black-and-white image. Luminosity Method Shade of Gray = 0.299 * Red + 0.587 * Green + 0.114 * Blue This is the default method. This is how the built-in Black-and-White effect converts a color image to black-and-white. This method gives different weights to Red, Green, and Blue. Other methods treat each color equally. Average Method Shade of Gray = (Red + Green + Blue) / 3 Lightness Method Shade of Gray = [Max(Red,Green,Blue) + Min(Red,Green,Blue)] / 2 Every color photograph is different. You'll just need to try each method to see which one works best for your specific photograph. Brightness/Contrast In addition to converting your photograph to black-and-white, I've also provided access to the Brightness and Contrast adjustments. For a more dramatic effect, decrease the brightness (try -10) and increase the contrast (try +10). Download Download this effect as part of my plugin pack: https://forums.getpaint.net/topic/113220-b Source Code Here is the icon: and here is the CodeLab source: // Name: Black and White+ // Author: BoltBait // Submenu: Adjustments // Title: BoltBait's Black and White+ v1.1 // Version: 1.1 // Desc: Convert image to Black and White // Keywords: Black and White|B&W // URL: http://BoltBait.com/pdn #region UICode ListBoxControl Amount1 = 0; // |Luminosity Method|Average Method|Lightness Method IntSliderControl Amount2 = 0; // [-100,100] Brightness/Contrast IntSliderControl Amount3 = 0; // [-100,100] #endregion BrightnessAndContrastAdjustment bacAdjustment = new BrightnessAndContrastAdjustment(); PropertyCollection bacProps; private double Max3(double x, double y, double z) { return (x > y) ? ((x > z) ? x : z) : ((y > z) ? y : z); } private double Min3(double x, double y, double z) { return (x < y) ? ((x < z) ? x : z) : ((y < z) ? y : z); } protected override void OnDispose(bool disposing) { if (disposing) { if (bacAdjustment != null) bacAdjustment.Dispose(); bacAdjustment = null; } base.OnDispose(disposing); } void PreRender(Surface dst, Surface src) { bacProps = bacAdjustment.CreatePropertyCollection(); PropertyBasedEffectConfigToken bacParameters = new PropertyBasedEffectConfigToken(bacProps); bacParameters.SetPropertyValue(BrightnessAndContrastAdjustment.PropertyNames.Brightness, Amount2); bacParameters.SetPropertyValue(BrightnessAndContrastAdjustment.PropertyNames.Contrast, Amount3); bacAdjustment.SetRenderInfo(bacParameters, new RenderArgs(dst), new RenderArgs(src)); } unsafe void Render(Surface dst, Surface src, Rectangle rect) { // Call the Brightness and Contrast Adjustment function bacAdjustment.Render(new Rectangle[1] {rect},0,1); for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; ColorBgra* dstPtr = dst.GetPointAddressUnchecked(rect.Left, y); for (int x = rect.Left; x < rect.Right; x++) { ColorBgra CurrentPixel = *dstPtr; byte K = CurrentPixel.R; if (!(CurrentPixel.R == CurrentPixel.G && CurrentPixel.G == CurrentPixel.B)) { switch (Amount1) { case 0: K = (byte)((0.299f * CurrentPixel.R) + (0.587f * CurrentPixel.G) + (0.114f * CurrentPixel.B)); break; case 1: K = (byte)((CurrentPixel.R + CurrentPixel.G + CurrentPixel.B) / 3.0); break; case 2: K = (byte)((Max3(CurrentPixel.R, CurrentPixel.G, CurrentPixel.B) + Min3(CurrentPixel.R, CurrentPixel.G, CurrentPixel.B)) / 2.0); break; default: break; } } CurrentPixel = ColorBgra.FromBgra(K,K,K,CurrentPixel.A); *dstPtr = CurrentPixel; dstPtr++; } } } Note: User MJW also made a Black and White+ plugin. His has way more adjustments than mine. I'm not sure, but you might be able to use his to get the same results as mine... I just couldn't figure out how to do it. If you like LOTS of things to tinker with, you might give his a try. The above is for Paint.NET v4.1.4+ Paint.NET v3.5.11 I'm sure someone will come along shortly and compile this for you.
×
×
  • Create New...