Still.Preprocessor.Image (Still v0.6.0) View Source
Handles image transformation.
To configure it, set :image_opts in the metadata:
%{
image_opts: %{
sizes: [100, 200],
transformations: [color_filter: "grayscale_bt709"]
}
}:sizes defines the widths of the output files to create.
:transformations defines the function name and arguments to call on the
adapter. By default, the adapter is Still.Preprocessor.Image.Mogrify.
However you can also include your own or make use of
Still.Preprocessor.Image.Imageflow by adding :still_imageflow as a
dependency and setting in your config:
config :still, :image_adapter, Still.Preprocessor.Image.Imageflow
The default quality value is 90. To change it, set the :image_quality key
in the config:
config :still, :image_quality, 80
For more information see Mogrify's options or ImageMagick's docs information.
When :image_opts is not set, it copies the input file to the output
file as it is.
Link to this section Summary
Functions
Runs after the next preprocessors finish running.
Runs the current preprocessor and invokes the next one.
Runs the Elixir.Still.SourceFile through the current preprocessor and the next.
Link to this section Functions
Specs
after_render(Still.SourceFile.t()) :: Still.SourceFile.t()
Runs after the next preprocessors finish running.
Returns the resulting Elixir.Still.SourceFile.
Specs
render(Still.SourceFile.t()) :: {:cont, Still.SourceFile.t()} | {:halt, Still.SourceFile.t()} | Still.SourceFile.t()
Runs the current preprocessor and invokes the next one.
Returns the resulting Elixir.Still.SourceFile.
Specs
run(Still.SourceFile.t()) :: Still.SourceFile.t()
Runs the Elixir.Still.SourceFile through the current preprocessor and the next.
Specs
run(Still.SourceFile.t(), any()) :: Still.SourceFile.t()