forked from AkkomaGang/akkoma
Allow both stdin and stdout
This commit is contained in:
parent
ddbddc08fc
commit
afa03ca8e2
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ def image_resize(url, %{max_width: max_width, max_height: max_height} = options)
|
||||||
convert - -resize '#{max_width}x#{max_height}>' -quality #{quality} -
|
convert - -resize '#{max_width}x#{max_height}>' -quality #{quality} -
|
||||||
"""
|
"""
|
||||||
|
|
||||||
pid = Port.open({:spawn, cmd}, [:use_stdio, :in, :stream, :exit_status, :binary])
|
pid = Port.open({:spawn, cmd}, [:use_stdio, :stream, :exit_status, :binary])
|
||||||
{:ok, env} = url |> Pleroma.Web.MediaProxy.url() |> Pleroma.HTTP.get()
|
{:ok, env} = url |> Pleroma.Web.MediaProxy.url() |> Pleroma.HTTP.get()
|
||||||
image = env.body
|
image = env.body
|
||||||
Port.command(pid, image)
|
Port.command(pid, image)
|
||||||
|
|
Loading…
Reference in a new issue