TechnoRobbo 1,157 Report post 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 Share this post Link to post Share on other sites
SAND33P 66 Report post 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 Share this post Link to post Share on other sites
DrewDale 740 Report post Posted September 3, 2013 Cool plugin. Thanks TR Quote Share this post Link to post Share on other sites
barbieq25 829 Report post Posted September 3, 2013 Such cute critters! Thanks again for all your hard work. Quote Share this post Link to post Share on other sites
TechnoRobbo 1,157 Report post Posted September 3, 2013 (edited) Version 1.1 Much more extreme warping. Faster Edited September 3, 2013 by TechnoRobbo Quote Share this post Link to post Share on other sites