Followers 0

# TR's Pixel Puller v1.1 (9-3-2013)

## 5 posts in this topic

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

ToyTiger

The 3 Zebra Stooges

The Menagerie

The Code

Hidden Content:

// Name: TR's Pixel Puller v1.1

// Title: Pixel Puller - v1.1

// Author: TechnoRobbo

#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 by TechnoRobbo
2

##### Share on other sites

AHHHHH that tiger is so cute when its all squishied hahaha!! Looks almost unreal how this is possible, definatly a download!

0

##### Share on other sites

Cool plugin. Thanks TR

0

##### Share on other sites

Such cute critters! Thanks again for all your hard work.

0

##### Share on other sites

Version 1.1 Much more extreme warping. Faster

Edited by TechnoRobbo
0

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account