
Deformations
============

``ink_diffuse``
---------------

``Image`` [OneBit|GreyScale|Grey16|Float|RGB] **ink_diffuse** (``Choice`` [Linear Horizontal|Linear Vertical|Brownian] *diffusion_type*, float *exponential_decay_constant*, int *random_seed* = -1)


:Operates on: ``Image`` [OneBit|GreyScale|Grey16|Float|RGB]
:Returns: ``Image`` [OneBit|GreyScale|Grey16|Float|RGB]
:Category: Deformations
:Defined in: deformation.py
:Author: Albert Brzeczko


Simulates water-driven diffusion of ink in paper.

----------

**Example 1:** ink_diffuse(0, 20)

..  image:: images/GreyScale_generic.png
   :height: 67
   :width: 96

..  image:: images/ink_diffuse_plugin_00.png
   :height: 67
   :width: 96



``inkrub``
----------

``Image`` [OneBit|GreyScale|Grey16|Float|RGB] **inkrub** (int(0, 500) *transcription_prob*, int *random_seed* = -1)


:Operates on: ``Image`` [OneBit|GreyScale|Grey16|Float|RGB]
:Returns: ``Image`` [OneBit|GreyScale|Grey16|Float|RGB]
:Category: Deformations
:Defined in: deformation.py
:Author: Albert Brzeczko


Simulates rubbing off of ink from another page.

----------

**Example 1:** inkrub(50)

..  image:: images/GreyScale_generic.png
   :height: 67
   :width: 96

..  image:: images/inkrub_plugin_00.png
   :height: 67
   :width: 96



``noise``
---------

``Image`` [OneBit|GreyScale|Grey16|Float|RGB] **noise** (int(0, 500) *amplitude*, ``Choice`` [Horizontal|Vertical] *direction*, int *random_seed* = -1)


:Operates on: ``Image`` [OneBit|GreyScale|Grey16|Float|RGB]
:Returns: ``Image`` [OneBit|GreyScale|Grey16|Float|RGB]
:Category: Deformations
:Defined in: deformation.py
:Author: Albert Brzeczko


Causes random shifting of pixels within a user-specified range, in
a user-specified direction.

----------

**Example 1:** noise(10, 0)

..  image:: images/RGB_generic.png
   :height: 129
   :width: 227

..  image:: images/noise_plugin_00.png
   :height: 129
   :width: 237



``rotate``
----------

``Image`` [OneBit|GreyScale|Grey16|RGB|Float|Complex] **rotate** (float(-180.00, 180.00) *angle*, Pixel *bgcolor*, int(1, 3) *order* = 1)


:Operates on: ``Image`` [OneBit|GreyScale|Grey16|RGB|Float|Complex]
:Returns: ``Image`` [OneBit|GreyScale|Grey16|RGB|Float|Complex]
:Category: Deformations
:Defined in: deformation.py
:Author: Michael Droettboom (With code from VIGRA by Ullrich Köthe)


Rotates an image.

*angle*
  The angle of rotation (in degrees)

*bgcolor*
  The color to use for pixels outside of the original image bounds.

*order*
  The order of the spline used for interpolation.  Must be between 1 - 3.

----------

**Example 1:** rotate(32.0, (255, 255, 255), 3)

..  image:: images/RGB_generic.png
   :height: 129
   :width: 227

..  image:: images/rotate_plugin_00.png
   :height: 233
   :width: 265

**Example 2:** rotate(15.0, 0j, 3)

..  image:: images/GreyScale_generic.png
   :height: 67
   :width: 96

..  image:: images/rotate_plugin_01.png
   :height: 93
   :width: 114



``wave``
--------

``Image`` [OneBit|GreyScale|Grey16|Float|RGB] **wave** (int(0, 2147483647) *amplitude*, int(0, 2147483647) *period*, ``Choice`` [Horizontal|Vertical] *direction*, ``Choice`` [Sinusoid|Square|Sawtooth|Triangle|Sinc] *waveform*, int *offset*, float *turbulence* = 0.00, int *random_seed* = -1)


:Operates on: ``Image`` [OneBit|GreyScale|Grey16|Float|RGB]
:Returns: ``Image`` [OneBit|GreyScale|Grey16|Float|RGB]
:Category: Deformations
:Defined in: deformation.py
:Author: Albert Brzeczko


Causes periodic disturbance of user-defined frequency, amplitude,
and direction.  Turbulence specifies the amount of random
variation from that line.

----------

**Example 1:** wave(5, 10, 0, 0, 0)

..  image:: images/RGB_generic.png
   :height: 129
   :width: 227

..  image:: images/wave_plugin_00.png
   :height: 134
   :width: 227

**Example 2:** wave(10, 5, 1, 2, 0)

..  image:: images/RGB_generic.png
   :height: 129
   :width: 227

..  image:: images/wave_plugin_01.png
   :height: 129
   :width: 237



