Allow both stdin and stdout

This commit is contained in:
Mark Felder 2020-08-25 17:36:53 -05:00
parent ddbddc08fc
commit afa03ca8e2
1 changed files with 1 additions and 1 deletions

View File

@ -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} -
"""
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()
image = env.body
Port.command(pid, image)