View Source Vix.Vips.MutableImage (vix v0.33.1)

Vips Mutable Image

See Vix.Vips.Image.mutate/2

Summary

Types

t()

Represents a mutable instance of VipsImage

Functions

Return the number of bands of a mutable image.

Returns a specification to start this module under a supervisor.

Returns metadata from the image

Return a boolean indicating if a mutable image has an alpha band.

Return the height of a mutable image.

Remove a metadata item from an image.

Create a metadata item on an image of the specified type. Vix converts value to specified GType

Return the shape of the image as {width, height, bands}.

Set the value of existing metadata item on an image. Value is converted to match existing value GType

Return the width of a mutable image.

Types

t()

@type t() :: %Vix.Vips.MutableImage{pid: pid()}

Represents a mutable instance of VipsImage

Functions

bands(mutable_image)

Return the number of bands of a mutable image.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get(mutable_image, name)

@spec get(t(), String.t()) :: {:ok, term()} | {:error, term()}

Returns metadata from the image

has_alpha?(mutable_image)

Return a boolean indicating if a mutable image has an alpha band.

height(mutable_image)

Return the height of a mutable image.

remove(mutable_image, name)

@spec remove(t(), String.t()) :: :ok | {:error, term()}

Remove a metadata item from an image.

set(mutable_image, name, type, value)

@spec set(t(), String.t(), atom(), term()) :: :ok | {:error, term()}

Create a metadata item on an image of the specified type. Vix converts value to specified GType

Supported GTypes

  • :gint
  • :guint
  • :gdouble
  • :gboolean
  • :gchararray
  • :VipsArrayInt
  • :VipsArrayDouble
  • :VipsArrayImage
  • :VipsRefString
  • :VipsBlob
  • :VipsImage
  • :VipsInterpolate

shape(mutable_image)

Return the shape of the image as {width, height, bands}.

update(mutable_image, name, value)

@spec update(t(), String.t(), term()) :: :ok | {:error, term()}

Set the value of existing metadata item on an image. Value is converted to match existing value GType

width(mutable_image)

Return the width of a mutable image.