3
Vote

Output to .NET Bitmap without bringing in PDN dependencies

description

Many developers are looking to incorporate this code as a library in their own applications. ImageDecoderPdn is currently written to convert only to the Paint.NET bitmap representation.

ImageDecoderPdn should offer the option of decoding to a standard .NET Bitmap, and with Paint.NET threading dependencies refactored out as well.

There should also be an API for quickly creating a PSD from a .NET Bitmap.

comments

anemitoff wrote Sep 17, 2013 at 2:41 PM

I have submitted a Pull request to enable decoding of layer image to a standard .NET Bitmap

taoyue wrote Sep 18, 2013 at 3:50 PM

I am implementing this in a way that does not result in any code duplication or conditional compilation. Thus, I will not be taking in any external changes for this work item. This ties into some deeper changes that I'm making to the code, so it will probably be after the release of Paint.net 4.0.

That having been said, I see that you implemented this feature by copying code from ImageDecoderPdn into a new class, ImageDecoderBitmap. Code duplication is almost never the right way to implement functionality. I recommend that changes be made directly to the existing files, so that you can pick up upstream bugfixes. Yes, you will get conflicts when you rebase -- but this is better than not being aware of conflicting changes at all.