toe_head2001 Posted January 21 Share Posted January 21 I'm using the Effect constructor that takes a System.Drawing.Image. Why do I need a reference to PaintDotNet.Windows, if I'm not using the constructor that takes a IBitmapSource? Do we even need a Classic Effect constructor that takes a IBitmapSource? Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Rick Brewster Posted January 21 Share Posted January 21 The IBitmapSource constructors are just there for consistency with the new BitmapEffect and GpuEffect classes. This is an unfortunate side effect of how .NET and C# do things ... if it says you need a reference, then you need one, even if you know you don't use it. *sigh* You shouldn't need a using PaintDotNet.Imaging; though, so none of the new types will be pulled into scope. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Rick Brewster Posted January 21 Share Posted January 21 I'm not planning to deprecate the use of System.Drawing.Image for the sake of the effect constructors (classic or new). While IBitmapSource is superior in many important ways, particularly locking and multithreading, there isn't currently a good way to go directly from embedded resources to an IBitmapSource (and even if I provide one, it's just not important enough to push on it). So System.Drawing.Image is de facto the way to do things here anyway. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
BoltBait Posted January 21 Share Posted January 21 13 minutes ago, Rick Brewster said: there isn't currently a good way to go directly from embedded resources to an IBitmapSource I need this if I'm ever to rewrite my Creative Text Pro plugin to the new system. Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
Rick Brewster Posted January 22 Share Posted January 22 5 hours ago, BoltBait said: I need this if I'm ever to rewrite my Creative Text Pro plugin to the new system. Not necessarily. The new plugin base classes still accept an Image, they don't require an IBitmapSource. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.