Vibe.Image.Resize.Backends.Command (vibe v0.2.0)

Copy Markdown View Source

Shared helpers for command-backed image resize backends.

Summary

Functions

executable?(name)

@spec executable?(String.t()) :: boolean()

image_from_output(original, output, mime_type)

@spec image_from_output(Vibe.Image.t(), Path.t(), String.t()) ::
  {:ok, Vibe.Image.t()} | {:error, term()}

run(argv, opts \\ [])

@spec run(
  [String.t()],
  keyword()
) :: :ok | {:error, term()}

with_temp_files(image, output_extension, opts, fun)

@spec with_temp_files(Vibe.Image.t(), String.t(), keyword(), (Path.t(), Path.t() ->
                                                          {:ok, Vibe.Image.t()}
                                                          | {:error, term()})) ::
  {:ok, Vibe.Image.t()} | {:error, term()}