The Twirl effect distorts the image as if it had been Twirled.

The result is like an image that has been twisted.

Syntax

[C#]

static void Twirl(Bitmap bitmap, double angle, double extent, Nullable<double> speed);

[Visual Basic]

Shared Sub Twirl(bitmap As Bitmap, angle As Double, extent As Double, speed As Nullable(Of Double))
Params
Name Description
bitmap The bitmap to process
angle The amount that the image should be twirled. A typical value might be 120 degrees.
extent How far the effect should extend. A typical value might be 50%.
speed There is a general speed versus quality tradeoff. Higher values produce faster results at the expense of quality. If null is provided this defaults to 8.
Notes

None.

Example

[C#]using (Bitmap bm = (Bitmap)Bitmap.FromFile(Server.MapPath("rez/felix-tchverkin-7pkN83wDZwY-unsplash.jpg"))) {
  Effects.Twirl(bm, 120, 50, 8);
  bm.Save(Server.MapPath("IG8_Effects_Twirl1.jpg"));
}
using (Bitmap bm = (Bitmap)Bitmap.FromFile(Server.MapPath("rez/felix-tchverkin-7pkN83wDZwY-unsplash.jpg"))) {
  Effects.Twirl(bm, 360, 50, 8);
  bm.Save(Server.MapPath("IG8_Effects_Twirl2.jpg"));
}
using (Bitmap bm = (Bitmap)Bitmap.FromFile(Server.MapPath("rez/felix-tchverkin-7pkN83wDZwY-unsplash.jpg"))) {
  Effects.Twirl(bm, 120, 100, 8);
  bm.Save(Server.MapPath("IG8_Effects_Twirl3.jpg"));
}


Here we apply a Twirl edge detection filter using different radii. Ouput files are shown below.


felix-tchverkin-7pkN83wDZwY-unsplash.jpg


IG8_Effects_Twirl1.jpg


IG8_Effects_Twirl2.jpg


IG8_Effects_Twirl3.jpg