pikalek Posted September 1, 2011 Share Posted September 1, 2011 (edited) Provides various pixel art scaling algorithms used in many console emulators. It's intended for enlarging low-resolution pixel and line art; use on other images may give strange results. The original Scale2x and Scale3x algorithms were developed by Andrea Mazzoleni. The original 2xSaI, Super2xSaI and SuperEagle algorithms developed by Derek Liauw Kie Fa (aka Kreed). There are slight differences between my implementation Kreed's algorithms and the originals. I use the nearest valid pixel for the out of range neighbor problem. The original code uses zeroed out pixels for top and bottom out of range neighbors (resulting in the black line artifacts at the top and bottom edges) and edge wrapping for left and right out of range neighbors (sometimes resulting in color bleed along the left & right edges). The my implementations of the Super2xSaI & SuperEagle filters do not currently work as desired. It seems like I'm interpolating differently, but I haven't found the source of the problem. Helps to check the results carefully; turns out I did fix this problem before releasing the beta. Issues I'd appreciated feedback on: I'm not sure which sub-menu would be the best home for this effect. I was unable to associate an icon with the plug-in using Visual Studio 2005. Figured it out. I considered adding a safety check box - the basic idea is that the user would need to check the box to enable the 'Send to Clipboard' button & that the box would clear in between 'visits' to the plug-in. I got impatient trying to set this up via the IndirectUI & figured maybe it wasn't a good use of time. The original algorithms were developed in GPL projects. I wasn't clear if my code would also be GPL (I.E. if my reimplementation different enough). It was even less clear how such licensing on a plug-in would mix with a non-GPL project like Paint.NET. I don't expect anyone to debug my Super2xSaI & SuperEagle filters, but you're welcome to surprise me. It's my first plug-in; if I've made any noob mistakes, don't hesitate to tell me. Possible future improvements: Add support for other related algorithms Add more options for the in place scaling within a selection Add selection masking when sending the image to the clipboard Fix bugs in the Super2xSaI & SuperEagle filters. Update plugin to reflect the previous code fix. PixelArtScaling-BetaLight.zip Edited September 13, 2011 by pikalek Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted September 3, 2011 Share Posted September 3, 2011 Screenshots and examples please? I've been considering adding an "image resampler" plugin type for 4.0. Built-ins would be nearest neighbor, bilinear, bicubic, super sampling, and Fant. Then stuff like this plugin of yours could be "first class" and not have to jump through hoops. 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...
pikalek Posted September 4, 2011 Author Share Posted September 4, 2011 Screenshots and examples please? Below is the starting reference image: Below is the result from the plug-in's scale2X filter: Below is the result from the plug-in's scale3x filter: Below is the result from the plug-in's 2xSaI filter: Below is the result from the plug-in's Super2xSaI filter: Below is the result from the plug-in's SuperEagle filter: Below is the result from the original 2xSaI implementation. Note the black line artifacts along the top & bottom and the color bleed along the upper right edge. The original implementations for Super2xSaI & SuperEagle give similar artifacts. Quote Link to comment Share on other sites More sharing options...
pikalek Posted September 4, 2011 Author Share Posted September 4, 2011 I've been considering adding an "image resampler" plugin type for 4.0. Built-ins would be nearest neighbor, bilinear, bicubic, super sampling, and Fant. Then stuff like this plugin of yours could be "first class" and not have to jump through hoops. I could see some plug-ins making good use of that. While jumping through the hoops required more up front time and frustration, it also meant that I had get a better handle on the framework sooner as opposed to later. Quote Link to comment Share on other sites More sharing options...
d32 Posted October 16, 2011 Share Posted October 16, 2011 Thanks a lot. I've been searching for implementations of various pixelart scaling algorithms for several hours. This project may be of help to you: http://code.google.com/p/hqx-sharp/ It's enhanced HQnX implementation, in C#. Quote Link to comment Share on other sites More sharing options...
Hawkynt Posted November 7, 2011 Share Posted November 7, 2011 Hi, you could simply use my C# image filter library from here 2dimagefilter at googlecode. I'd like to see that in your plugin Quote Link to comment Share on other sites More sharing options...
Jkowltalon Posted February 6, 2012 Share Posted February 6, 2012 I made a pixel art image of a pigeon and it got a little bigger. Then I did it again, and it disaperred. How can I get it so that it will become larger? Quote 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.