TechnoRobbo Posted September 2, 2013 Share Posted September 2, 2013 (edited) Technorobbo's Pixel Puller Designed to be a companion piece to the Pixel Pusher Pull the image around to emphasize or de-emphasize perspective. V1.1 faster code - Extreme warping Menu: Effects->Distort ToyTiger The 3 Zebra Stooges The Menagerie The Code Hidden Content: // Submenu: Distort // Name: TR's Pixel Puller v1.1 // Title: Pixel Puller - v1.1 // Author: TechnoRobbo // URL: http://www.technorobbo.com #region UICode Pair<double, double> Amount1 = Pair.Create( 0.0 , 0.0 ); // Image Control byte Amount2 = 0; // [1] Warp Type|Bezier (smooth)|Exponential (Extreme) #endregion void Render(Surface dst, Surface src, Rectangle rect) { Rectangle sel = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); //Pull=================================== float controlx =(float)((Amount1.First + 1)/2); float controly =(float)((Amount1.Second + 1)/2); bool bezier = (Amount2==0); float nx = 0; float ny = 0; for (int y = rect.Top; y <rect.Bottom; y++){ for (int x=rect.Left ; x< rect.Right ;x++){ float spanx =((float)x - (float)sel.Left)/(float)sel.Width; float spany =((float)y - (float)sel.Top)/(float)sel.Height; if (bezier){ nx =sel.Left + (1-((controlx * (1 - spanx)) * spanx + (1 - spanx) * (controlx * spanx + (1 - spanx)))) * sel.Width; ny =sel.Top + (1-((controly * (1 - spany)) * spany + (1 - spany) * (controly * spany + (1 - spany)))) * sel.Height; }else{ nx =sel.Left + (float)Math.Pow(spanx,controlx * 4.90 +.1) * sel.Width; ny =sel.Top + (float)Math.Pow(spany,controly * 4.90 +.1) * sel.Height; } ColorBgra CP= src.GetBilinearSampleClamped(nx,ny); dst[x,y]=CP; } } } TRsPixelPuller.zip Edited December 28, 2015 by TechnoRobbo 2 Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
SAND33P Posted September 2, 2013 Share Posted September 2, 2013 AHHHHH that tiger is so cute when its all squishied hahaha!! Looks almost unreal how this is possible, definatly a download! Quote Link to comment Share on other sites More sharing options...
DrewDale Posted September 3, 2013 Share Posted September 3, 2013 Cool plugin. Thanks TR Quote Link to comment Share on other sites More sharing options...
barbieq25 Posted September 3, 2013 Share Posted September 3, 2013 Such cute critters! Thanks again for all your hard work. Quote Knowledge is no burden to carry. April Jones, 2012 Gallery My DA Gallery Link to comment Share on other sites More sharing options...
TechnoRobbo Posted September 3, 2013 Author Share Posted September 3, 2013 (edited) Version 1.1 Much more extreme warping. Faster Edited September 3, 2013 by TechnoRobbo Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins 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.