null54 508 Report post Posted August 20, 2015 This is Zoom Blur Deluxe recompiled to be compatible with Paint.NET 4.0, no other changes have been made.The following description is copied from the original thread. It is faster than the built-in zoom effect and you can move the center. Enjoy !License : Same as Paint Dot Net license. (MIT) ZoomBlurDeluxe_4.0.zipZoomBlurDeluxeSrc_4.0.zip 6 Quote Share this post Link to post Share on other sites
MJW 1,114 Report post Posted August 20, 2015 Very good, null54! Quote Share this post Link to post Share on other sites
toe_head2001 1,462 Report post Posted August 20, 2015 This is Zoom Blur Deluxe recompiled to be compatible with Paint.NET 4.0, no other changes have been made. If I convert this to IndirectUI, will you add it to the first post? Quote Share this post Link to post Share on other sites
MJW 1,114 Report post Posted August 20, 2015 For some reason, after I copied the DLL to my PDN effects directory, it still didn't show up in my Effects>Blur menu. I built the plugin, myself, and it worked fine. Quite a nice effect, too. In case anyone else has the same problem, here is my build: ZoomBlurDeluxe.zip If no one else has the problem, I'll delete the attachment later. Quote Share this post Link to post Share on other sites
toe_head2001 1,462 Report post Posted August 20, 2015 (edited) For some reason, after I copied the DLL to my PDN effects directory, it still didn't show up in my Effects>Blur menu.... Hmm, I had no issue with it. It is faster than the built-in zoom effect... In my unscientific testing (both effects at comparable settings) of several 5,000px x 5,000px photos, I found the built-in effect to be faster. Still, this effect produces slightly different results compared to the built-in effect, so I think I'll keep it. Edited August 20, 2015 by toe_head2001 Quote Share this post Link to post Share on other sites
doughty 317 Report post Posted August 20, 2015 I have an old dll that crashed PDN and I also download the dll that didn't show up. I tested the one you just posted, it isn't quit the same, but that can be due to so many other things I understand that. I'm about to try a tutorial to see what happens. Thank you so much for just seemingly just throwing one together. Quote Share this post Link to post Share on other sites
MJW 1,114 Report post Posted August 20, 2015 (edited) Here's source for a CodeLab version, in case anyone is interested: Hidden Content: // Name: Zoom Blur Deluxe CL // Submenu: Blurs // Author: Kevin Drapel (and MJW) // Title: Zoom Blur Deluxe CL // Desc: CodeLab version of Zoom Blur Deluxe // Keywords: // URL: // Help: #region UICode int Amount1 = 20; // [0,256] Amount Pair<double, double> Amount2 = Pair.Create( 0.0 , 0.0 ); // Center byte Amount3 = 0; // [1] Quality|Low|Medium|High #endregion void Render(Surface dst, Surface src, Rectangle rect) { long w = dst.Width; long h = dst.Height; int amount = Amount1; int quality = Amount3; long cx = (long)((0.5 * src.Width) * (Amount2.First + 1.0)) << 8; long cy = (long)((0.5 * src.Height) * (Amount2.Second + 1.0)) << 8; long fx, fy; long fdx, fdy; long tx, ty; long rx, ry; int sa, sg, sb, sr; byte shiftFactor = 2; byte shiftFactor2 = 8; byte steps = 4; switch (quality) { case 0: shiftFactor = 3; steps = 8; break; case 1: shiftFactor = 5; steps = 32; break; case 2: shiftFactor = 6; steps = 64; break; } shiftFactor2 += shiftFactor; unsafe { for (int y = rect.Top; y < rect.Bottom; ++y) { fy = y << 8; fdy = (amount * (cy - fy)) >> shiftFactor2; ColorBgra* dstPtr = dst.GetPointAddressUnchecked(rect.Left, y); ColorBgra* srcPtr = src.GetPointAddressUnchecked(rect.Left, y); for (int x = rect.Left; x < rect.Right; ++x) { fx = x << 8; fdx = (amount * (cx - fx)) >> shiftFactor2; tx = fx; ty = fy; sr = sg = sb = sa = 0; for (int n = 0; n < steps; n++) { rx = tx >> 8; ry = ty >> 8; if (rx < 0) rx = 0; if (ry < 0) ry = 0; if (rx >= src.Width) rx = src.Width - 1; if (ry >= src.Height) ry = src.Height - 1; ColorBgra* srcPtr2 = src.GetPointAddress((int)rx, (int)ry); sr += srcPtr2->R * srcPtr2->A; sg += srcPtr2->G * srcPtr2->A; sb += srcPtr2->B * srcPtr2->A; sa += srcPtr2->A; tx += fdx; ty += fdy; } sr >>= shiftFactor2; sg >>= shiftFactor2; sb >>= shiftFactor2; sa >>= shiftFactor; *dstPtr++ = ColorBgra.FromBgra((byte)sb, (byte)sg, (byte)sr, (byte)sa); } } } } Here's the icon: EDIT: At toe_head2001's suggestion, I changed the blur range to 0-255. (toe_head2001 points out that in the original version it's 1-256, but I like the no-blur option, and somehow 255 seems to me to be more sensible as the top of the range. It's easy to change if someone insists it match the original.) EDIT2: At toe_head2001's suggestion, I changed the blur default to 20. I missed that in my first edit. I also changed the top of the range to 256, because my reason for not doing so was silly. I left 0 as the lower range, because I do like the idea of being able to see the image with no blur. (I could make it a do so more efficiently by handling that as a special case.) Edited August 20, 2015 by MJW 3 Quote Share this post Link to post Share on other sites
null54 508 Report post Posted August 20, 2015 If I convert this to IndirectUI, will you add it to the first post? Yes. In my unscientific testing (both effects at comparable settings) of several 5,000px x 5,000px photos, I found the built-in effect to be faster. That was copied from the original thread, it may have been faster when the effect was first posted in 2007. Quote Share this post Link to post Share on other sites
toe_head2001 1,462 Report post Posted August 20, 2015 (edited) Here's source for a CodeLab version, in case anyone is interested... I was just about to post that... you beat me to it. Hey, look at this line: int Amount1 = 10; // [0,100] AmountThe original source allowed for a zoom range of 1 - 256, and had a default of 20 Edit: Here's the IndirectUI dll for those that want it. ZoomBlurDeluxe.zip Edited November 19, 2015 by toe_head2001 3 Quote Share this post Link to post Share on other sites
MJW 1,114 Report post Posted August 20, 2015 Sorry, toe_head2001. I didn't post the CodeLab version so much so that someone could use it (since they can use the original), but just because I thought someone might use it as the basis for some other variation. Quote Share this post Link to post Share on other sites
Eli 1,072 Report post Posted August 20, 2015 (edited) Thanks for this update. (EER inspired me ) Edited August 20, 2015 by Eli 1 Quote Share this post Link to post Share on other sites
Red ochre 1,468 Report post Posted August 20, 2015 Thanks for the update Null54. Thanks for the code MJW. Quote Share this post Link to post Share on other sites
Pixey 3,891 Report post Posted August 20, 2015 It's working well and thank you Mr. Null 2 Quote Share this post Link to post Share on other sites
doughty 317 Report post Posted August 20, 2015 Good job Pixey, I was trying to do Yellowman's Wall Light a few days ago. Thank you all for doing your bit at bringing this back. Quote Share this post Link to post Share on other sites
barbieq25 931 Report post Posted August 22, 2015 Oh thank you so much! I have missed this terribly. Quote Share this post Link to post Share on other sites
Marilynx 20 Report post Posted November 23, 2015 This is Zoom Blur Deluxe recompiled to be compatible with Paint.NET 4.0, no other changes have been made. The following description is copied from the original thread. ZoomBlurDeluxe_4.0.zip ZoomBlurDeluxeSrc_4.0.zip So do I need everything in both these zips to have the Zoom blur deluxe? And does it all go in Effects? Still learning this stuff.... Quote Share this post Link to post Share on other sites
MJW 1,114 Report post Posted November 23, 2015 Just the first. The second is the source code, of interest only to plugin programmers. Quote Share this post Link to post Share on other sites