Jump to content

KrisVDM

Members
  • Posts

    167
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by KrisVDM

  1. That's exactly what I mean. The quantization is visible after one run though, it just becomes very obvious after multiple runs. Can it not be fixed, now that 3.5 is stabilizing? This is one of those things that make me consider shooting all photo's in RAW and using Digital Photo Professional...
  2. Something seems wrong with the accuracy of the Hue/Saturation adjustment. Take any photograph, and apply the adjustment about 6 times, with parameters Hue = 0, Saturation = 200, Lightness = 0. You’ll notice that only primary and secondary colors remain, i.e. colors where r, g and b are either 0 or 255. I would expect the full range of hues to remain; only saturation should have increased.
  3. Hi Neil,I had a quick look at the code, and it seems that there is plenty of room for optimization. Here's a few tips, for your information: 1. You are using type Datum for two different things, one is input, the other is an accumulator for the means. Separate them. Actually, you don't need a type for an input Datum. You only need one bit to store whether the pixel is selected or not. You could use a single byte to store this (or use bitwise arthmetic to pack 32 pixels in a single uint). The actual color can be read from the source surface. The scaled location can be calculated on the fly, as it is just one floating point multiplication for each coordinate dimension. Calculate the multiplication factor just once for each dimension though, not for every pixel as you do now. Whatever you do, do not use a class for Datum, use a struct instead. 2. Get rid of Datum.UpdateAverage. You should just add vectors together, and divide by the count just once after adding. UpdateCentroids is already calculating the count for each mean, but not using this count afterwards. 3. R, G, B and A are bytes. To calculate the mean, you can add them in a long. Don't use floats to add bytes together. Certainly don't use floats to store your input colors as you do now. 4. SquaredDistance will be much faster if R, G, B and A are just bytes. Create a function SquaredDistance that takes the two colors, and the two int x and int y coordinates as input. Calculate the scaled location on the fly as described above. 5. Assignments is an int[]. If you limit the number of clusters to 256, you can use a byte[]. If you feel that's not enough, consider a ushort[]. Again less memory. Bringing down the amount of memory used will also improve cache efficiency, and therefore speed. This is just the low-hanging fruit. I hope you appreciate these comments. They're meant to help you, and I hope they do.
  4. Can you try it on a a released OS? Are you sure that the delay disappears when you delete (or move) the dlls from the effects folder? So far, I have never seen such behavior, and I have tested on XP 32 bit, Vista 32 bit and Windows 7 64 bit. Anyone else seen this?
  5. It's in the same zip file with the other dll's, and it should be placed in the same destination directory.
  6. I haven't tested the effects under the alpha so far. I do intend to update all effects as soon as a 3.5 beta is available. In the meantime, you might consider reporting this to Rick too. Edit: Turns out this was a problem with version 3.1 of my effects. Version 3.3 does not have that problem. If you experience the same problem, I suggest you upgrade to the latest version of my effects. In fact, I suggest you upgrade even if you don't have the problem. The new version has more features and is a lot faster.
  7. Several people asked for this, so I finally decided to implement it. Version 3.3 of the Drop Shadow effect now has a shadow opacity setting. I've also optimized the effect significantly. On big images with relatively small objects, the effect is now a lot faster, especially when using large widening and blur values. Makes sense, so did that too. Download from my download page.
  8. Thanks! You must be the first person to actually look at that source code. I love that you refer to it as "beautiful": I guess some people use paint.Net to create beatiful images, I used it to try to create beatiful code ;-).
  9. You can get a transparent shadow with the current version already:Depending on your exact needs, the first option is to blur the shadow. That blurs the edges of the shadow into full transparency. The shadow itself is not transparent though. Your second option is to use layers. Copy the layer containing your "object" using the copy button in the layers window. Then select the bottom layer, i.e. the one you copied, not the one that contains the copy. Apply the drop shadow effect to this layer, but make sure that you turn the "Keep original image" option off. The layer will now contain a shadow only, not the "object" that created the shadow. That "object" is however still visible in the layer above it, i.e. the copy you created earlier. Now set the opacity of the layer containing the shadow, that will give you the effect you want. You can do so by editing the options on the layer. Double click the layer in the layers window, leave the blending mode to normal (or experiment with other modes!) and change the opacity. Hope this helps.
  10. I suppose this is an artefact of the the Tools, History, Colors and Layers windows being true windows: you don't see the tooltips in them or in the tool bar of the main window until you select it (e.g. by clicking its title bar). Also, the shortcuts for the tools only work if the main window is active, not when the tools window is active. And since we're at it, both "Move selected pixels" and "Move selection" show 'M' as their shortcut. Pressing M select the "Move selection tool" by the way.
  11. It seems that when "marching ants" are visible (i.e. a selection border), one CPU is fully utilized. On a hyperhtreading CPU, I see approx. 70% CPU utilization. Is this normal?
  12. Directly under C:\Program Files\Paint.NET\Effects\ (no subfolder!), place the dlls:Vandermotten.PaintDotNetEffects.dll (This one is mandatory) Vandermotten.PaintDotNetEffects.Samples.dll Vandermotten.PaintDotNetEffects.Blurs.dll Vandermotten.PaintDotNetEffects.DropShadow.dll Vandermotten.PaintDotNetEffects.Duotones.dll Vandermotten.PaintDotNetEffects.FadeEdge.dll Vandermotten.PaintDotNetEffects.Monochromes.dll Each of the effect dlls is optional, but of course, you need at least one.
  13. I agree. The background should be a solid gray. I don't care if it's configurable or not, but gray (50%-ish) should be the default and it should not be based on a windows theme color.
  14. What kind of picture are you trying this on? You need a picture with transparency for the drop shadow to have any kind of effect. So it won't do anything on a jpeg image, for example. Just to see the effect, use the eraser with a big radius (100 pixels or so) and erase part of your image. Then try again.
  15. It's pretty stable. Give it a shot, if it doesn't work out you can alway uninstall and go back to the latest non-beta release.
  16. Planning? No, it's done. You'll need to download Paint.NET beta 2 though.Updated effects available through my blog at http://www.u2u.info/Blogs/Kris/
  17. Well, that's just the thing, it couldn't, not in a clean way anyway. (For you plug-in dev's out there: when widening and blur are used together, I effectively need an intermediate surface, and I need it in a way that scales and is thread-safe. My framework gives me that.) And the widening for the drop shadow is what started this entire thing for me: somebody asked me for it, and I just wanted to do it.But hey: Rick is "looking into" adding color picker support for effects (for dev's: a color property in IndirectUI). When that happens, you'll have an update for the Drop Shadow (and others) with a color picker within days. I promise. Kris.
  18. That was my impression as well :-( That's two votes and counting ;-)
  19. I'd rather not. That code had some significant issues, and I don't want to maintain or support it. And BTW, it won't work with a simple recompile! We basically have to recreate the color wheel ourselves, though Rick has suggested that we copy and paste Paint.NET code to do so.But you have the source code for the new one. If you can find out how to add your own property types and controls to Indirect UI let me know. I'd be glad to update the effects with color pickers. Kris.
  20. Well, to be honest, I myself miss the color wheel too, but I was hoping the new stuff made up for that, the new stuff being:- wider range for the offsets (-10..10 became -20..20) - blur is now circular instead of rectangular - shadow widening has been added And the speed didn't suffer too much. In fact, in many scenario's it's faster than the old one. Only if you combine widening and blur it can become (very) slow but hey, that ís complex stuff. If you want the color wheel back, I suggest you try to convince Rick to add support for it in Indirect UI. Kris.
  21. Rick, I don't know if you followed the discussion on viewtopic.php?f=16&t=22881, but basically they're begging and calling me names because I dropped the color wheel from the Drop Shadow UI. I know I said so before, but I believe many effects and adjustments could benefit from a color wheel (or even tow for my duotones) in the effect UI. Would you please consider adding Indirect UI support for colors? Alternatively, could you give us some pointers on how to add your own controls to Indirect UI dialogs? I haven't looked for long, but did not see an immediate way to do it. Kris Vandermotten. http://www.u2u.info/Blogs/Kris/
×
×
  • Create New...