Jump to content

MJW

Members
  • Posts

    2,863
  • Joined

  • Last visited

  • Days Won

    70

Everything posted by MJW

  1. I'm confused by something. If I define a PluginSupportInfoClass the following way, the effect's Tooltip has all the correct information: Define a base class as: public class PluginSupportInfoBase : IPluginSupportInfo { public string Author { get { return ((AssemblyCopyrightAttribute)base.GetType().Assembly.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false)[0]).Copyright; } } public string Copyright { get { return ((AssemblyDescriptionAttribute)base.GetType().Assembly.GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false)[0]).Description; } } public string DisplayName { get { return ((AssemblyProductAttribute)base.GetType().Assembly.GetCustomAttributes(typeof(AssemblyProductAttribute), false)[0]).Product; } } public Version Version { get { return base.GetType().Assembly.GetName().Version; } } public Uri WebsiteUri { get { return new Uri("http://forums.getpaint.net/index.php?/topic/BaseClass/"); } } } Then define a derived class as: public class PluginSupportInfo : PluginSupportInfoBase, IPluginSupportInfo { } If I add a do-nothing, no-argument constructor call to the derived class, as follows, the Tooltip no longer contains the plugin information. public class PluginSupportInfo : PluginSupportInfoBase, IPluginSupportInfo { PluginSupportInfo() : base() { } } For anyone with a firm understating of constructors (i.e., not me), it's probably obvious, but I don't see why the first works and the second doesn't. (I intend to pass arguments in the base constructor eventually, but I wanted to test the simplest case first.)
  2. No. I think you misunderstand what you're seeing. When you paste a selection that has a transparent region into another layer, the transparency is also pasted. So when you move the selection around, the transparency replaces any opaque pixels in the layer it was pasted into. For instance, suppose you have a completely transparent layer and a completely opaque layer. If you make a circular selection while the transparent layer is active, copy it, then paste it into the opaque layer, there will be a transparent round hole in the opaque layer which you can move around. The transparency has been pasted into the opaque layer. It isn't blended with the pixels in the opaque layer. If you want it blended, you need to paste into a new layer. I suggest you: Open a new image. Add a new layer (don't duplicate the background layer). Select a region in the new, transparent layer with one of the selection tools. Paste it into the opaque layer. I think you'll see what I mean. EDIT: I guess I see what you mean, and the answer is, "Sort of, yes." The transparency doesn't work within the same layer because when you paste into a layer, the selection replaces what's in the layer, it isn't blended with it. That's the way it works, and (in my opinion) the way it should work. As I said, to get the result you want, paste the selection into a new layer. You can re-position it, and when you get it where you want it, you can merge the layer down.
  3. It does seem a bit strange, but it makes sense. The selection pasted into a layer replaces the region in the layer, so the corresponding area in the new layer is made transparent. The solution is to paste into a new layer.
  4. That seems very, very, very silly to me. Green ought to be green! As a programmer, I would always assume Red, Blue, and Green represent the full-strength primary colors. That's really annoying!
  5. Instead of what I would expect, (B: 0, G: 255, R: 0). Red and Blue are both what I would expect. This is in PDN 4.0.12.
  6. Thanks, BoltBait. I'll leave them as they are then. I'd never bothered looking at he stuff before, and it seemed slightly weird.
  7. In looking more closely at the PluginSupportInfo properties, I'm a little confused. In one of my plugins it is: [assembly: AssemblyTitle("HsvEraser Plugin for Paint.NET")] [assembly: AssemblyDescription("Erase pixels of selected HSV value.")] [assembly: AssemblyConfiguration("hsv erase")] [assembly: AssemblyCompany("MJW")] [assembly: AssemblyProduct("HsvEraser")] [assembly: AssemblyCopyright("Copyright © MJW")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: AssemblyVersion("1.0.*")] namespace HsvEraserEffect { public class PluginSupportInfo : IPluginSupportInfo { public string Author { get { return ((AssemblyCopyrightAttribute)base.GetType().Assembly.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false)[0]).Copyright; } } public string Copyright { get { return ((AssemblyDescriptionAttribute)base.GetType().Assembly.GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false)[0]).Description; } } public string DisplayName { get { return ((AssemblyProductAttribute)base.GetType().Assembly.GetCustomAttributes(typeof(AssemblyProductAttribute), false)[0]).Product; } } public Version Version { get { return base.GetType().Assembly.GetName().Version; } } public Uri WebsiteUri { get { return new Uri("http://www.getpaint.net/redirect/plugins.html"); } } } I've looked at other plugins, such as BoltBait's HueSatPlus, and it seems to be the same. I find it odd that Author returns the Copyright attribute, and Copyright returns the Description attribute. I'd expect Author to return AssemblyCompany, and Copyright to return AssemblyCopyright. Also, as an added bonus comment, I assume there's no appropriate Assembly property for the URI, but it'd be nice if there were. (I don't know much about the Assembly attributes -- to say the least.)
  8. Thanks, Maximilian! You are far too kind. I think it has much more to do with stubbornness than artistry. I find it hard to give up on an idea even if I can't figure out how to do it. The thing that irritates me about missing the "Bend it / Shape it" comp is that distortions are the kind of thing I enjoy doing.
  9. The problem with Rotate / Zoom is that it can only produce a limited subset of possible perpective transformations, so it's hard to match it to a given image. I think my (still beta after all these years) Perspective Transformation may work better for this purpose. Placing the corners may be a little tricky when using text on a transparent background. One way that should work is to: Create a layer above the wall image and fill it with a color. Map the rectangle onto the wall with Perspective Transformation. Delete the color layer and move the text layer above the wall layer, making the text layer active. Rerun Perspective Transformation, not moving the corner control points, but using the scale and offset controls to place the text.
  10. I'm annoyed with myself for not submitting an entry in the "Bend it, Shape it" SOTW competition. I started one, but it was a little too complex, and I had a few too many distractions.
  11. You might want to try my Color Clearer plugin, which is similar to the Grim Reaper, but for some purposes better.
  12. Plugin threads are like vampires: they live forever. 11) Don't reply to very old threads. Also known as "reviving" or "resusitating" old/dead threads. Also called "necroposting" (eww). If there has been no discussion in a thread for, say, 3 months ... then it is dead. Do not reply to it -- pretend like it is locked. If you reply to it, then the thread will be immediately locked and your post may be deleted. Please just create a new thread if you have something to say about that subject. However, this rule does not apply to The Overflow, Tutorials, Pictorium, or Plugins sections of the forum.
  13. jilllorraine,If you can wait a few weeks, I'll try to write a plugin to help. I'm somewhat busy at the moment, and the plugin would require doing some things I believe are doable, but which I currently don't know how to do, so it won't be done right away. The plugin I have in mind would allow you to select a rectangle size from a list. The rectangle would be displayed on the image as an outline, or perhaps as a transparent rectangle surrounded by a darker region (like the View Framer). The rectangle could be positioned within the image. Once the region was selected, you'd click a "Copy to Clipboard" button, at which time the image within the rectangle would be copied into the clipboard, and the selection rectangle would disappear (to let you know the copy was completed, and so that when you exited the plugin, the original image would be unmodified). The clipboard image could then be pasted as a new image or into a layer. If other plugin writers wish to offer advice, the two special things I'd need to do are: - Within OnCreateConfigUI, read a file with a fixed name, from a fixed folder in the the Paint.NET User File folder to populate the rectangle size list. - Copy an image to the clipboard. I believe I can adapt the file-reading routines from CodeLab, and I know Hawkynt's 2D-ImageFilter Library writes the clipboard. I'm not absolutely sure there isn't a problem reading a file inside OnCreateConfigUI, though I can't see any obvious reason it wouldn't be okay.
  14. I really don't see any good justification for this feature. There's no reason to suppose the layer that becomes active is a layer the user would want to make active, I think it should be eliminated, but I'd very gladly settle for a setting that disables it. The supposed reason is to prevent users from being confused when the changes they make aren't visible. I don't think that actually makes sense (since seeing the changes, but not realizing they're being made to the wrong layer seems worse), but if it does make sense, requiring the user to take responsibility by purposely disabling the feature would seem to solve the problem. (The layer that's activated isn't always the next visible layer beneath the layer made invisible, even when there is a lower visible layer. Perhaps it's the nearest visible layer, with ties going to the lower layer. Not that it really matters; one arbitrarily chosen layer is as good as another.)
  15. That's it, toe_head2001! Natsu, I doubt there's a "perfect" way to do automatic rescaling. As the old saying goes, "What do you want, eggs in your beer?"
  16. That's what we assumed you wanted to do. Now I think I know. I also vaguely remember a plugin that implements several algorithms for that sort of thing. I'll see if I can find it when I get a chance.
  17. In the Resize menu, set Resampling to Nearest Neighbor, otherwise it will blur.
  18. Off hand I don't know how to copy portions of images to the clipboard with a plugin, but if it could be done, I think it would go a long way to solving jilllorraine's problem. The clipboard image could be pasted as a new image or into a layer.
  19. More detail would help. What are the steps you use in attempting to add a 2560 x 1440 background? I'm not even sure what you mean.
  20. That really looks like it was stamped out of metal, Eli! I particularly like the indented border.
  21. That's a very nice effect, Seerose!
  22. Perhaps there's some other way of achieving your objective that could be done with a plugin. What do you do with the regions after you've selected them?
  23. Yes. The Texture Smoother is for smoothing the height map, not the final image. I think you may want to move the position of the directional light in the Texture Shader. Making the light come from the upper-left generally works well. Or at least I like it.
  24. That is a 24-bit height map. Now run the Texture Shader on that image.
×
×
  • Create New...