Current section

Files

Jump to
sac_thumbnails lib sac_thumbnails merge.ex
Raw

lib/sac_thumbnails/merge.ex

defmodule SacThumbnails.Merge do
def run(background_image, foreground_image, output_path) do
params =
[~s(#{background_image}), ~s(#{foreground_image})] ++
~w(-gravity center -compose DstOver -composite) ++ [~s(#{output_path})]
System.cmd("magick", params)
end
end