View Source Image.Draw (image v0.8.0)
Functions to draw directly on a mutable image.
Link to this section Summary
Functions
Draw a circle on a mutable image.
Flood an area of a mutuable image bounded by the given color.
Draw one image over the top of a mutable image.
Draw a line on a mutable image.
Draw mask on the image.
Draw a point on a mutable image.
Draw a rectangle on a mutable image.
Smudge a section of image .
Link to this section Functions
Draw a circle on a mutable image.
@spec flood( Vix.Vips.Image.t(), non_neg_integer(), non_neg_integer(), Image.Options.Draw.flood() ) :: {:ok, {Vix.Vips.Image.t(), height: integer(), width: integer(), top: integer(), left: integer()}} | {:error, Image.error_message()}
@spec flood( Vix.Vips.MutableImage.t(), non_neg_integer(), non_neg_integer(), Image.Options.Draw.flood() ) :: {:ok, {Vix.Vips.Image.t(), height: integer(), width: integer(), top: integer(), left: integer()}} | {:error, Image.error_message()}
Flood an area of a mutuable image bounded by the given color.
@spec image( Vix.Vips.Image.t(), Vix.Vips.Image.t(), non_neg_integer(), non_neg_integer(), Image.Options.Draw.image() ) :: {:ok, Vix.Vips.Image.t()} | {:error, Image.error_message()}
@spec image( Vix.Vips.MutableImage.t(), Vix.Vips.Image.t(), non_neg_integer(), non_neg_integer(), Image.Options.Draw.image() ) :: {:ok, Vix.Vips.Image.t()} | {:error, Image.error_message()}
Draw one image over the top of a mutable image.
@spec line( Vix.Vips.Image.t(), non_neg_integer(), non_neg_integer(), non_neg_integer(), non_neg_integer(), Image.Options.Draw.line() ) :: {:ok, Vix.Vips.Image.t()} | {:error, Image.error_message()}
@spec line( Vix.Vips.MutableImage.t(), non_neg_integer(), non_neg_integer(), non_neg_integer(), non_neg_integer(), Image.Options.Draw.line() ) :: {:ok, Vix.Vips.Image.t()} | {:error, Image.error_message()}
Draw a line on a mutable image.
@spec mask( Vix.Vips.Image.t(), Vix.Vips.Image.t(), non_neg_integer(), non_neg_integer(), Image.Options.Draw.mask() ) :: {:ok, {Vix.Vips.Image.t(), height: integer(), width: integer(), top: integer(), left: integer()}} | {:error, Image.error_message()}
@spec mask( Vix.Vips.MutableImage.t(), Vix.Vips.Image.t(), non_neg_integer(), non_neg_integer(), Image.Options.Draw.mask() ) :: {:ok, {Vix.Vips.Image.t(), height: integer(), width: integer(), top: integer(), left: integer()}} | {:error, Image.error_message()}
Draw mask on the image.
Mask is a monochrome 8-bit image with the values of 0
or 255
for transparent
and any other value as a color to be blended into the base image.
@spec point( Vix.Vips.Image.t(), non_neg_integer(), non_neg_integer(), Image.Options.Draw.point() ) :: {:ok, Vix.Vips.Image.t()} | {:error, Image.error_message()}
@spec point( Vix.Vips.MutableImage.t(), non_neg_integer(), non_neg_integer(), Image.Options.Draw.point() ) :: :ok | {:error, Image.error_message()}
Draw a point on a mutable image.
rect(image, left, top, width, height, options \\ [])
View Source (since 0.7.0)@spec rect( Vix.Vips.Image.t(), non_neg_integer(), non_neg_integer(), pos_integer(), pos_integer(), Image.Options.Draw.rect() ) :: {:ok, Vix.Vips.Image.t()} | {:error, Image.error_message()}
@spec rect( Vix.Vips.MutableImage.t(), non_neg_integer(), non_neg_integer(), pos_integer(), pos_integer(), Image.Options.Draw.rect() ) :: :ok | {:error, Image.error_message()}
Draw a rectangle on a mutable image.
smudge(image, left, top, width, height, options \\ [])
View Source (since 0.7.0)@spec smudge( Vix.Vips.Image.t(), non_neg_integer(), non_neg_integer(), pos_integer(), pos_integer(), Image.Options.Draw.smudge() ) :: {:ok, Vix.Vips.Image.t()} | {:error, Image.error_message()}
@spec smudge( Vix.Vips.MutableImage.t(), non_neg_integer(), non_neg_integer(), pos_integer(), pos_integer(), Image.Options.Draw.smudge() ) :: :ok | {:error, Image.error_message()}
Smudge a section of image .
Each pixel in the area left , top , width , height is replaced by the average of the surrounding 3x3 pixels.