projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d4d1192
)
Change method of convert using stdout, make progressive jpegs
author
Mark Felder
<feld@FreeBSD.org>
Wed, 26 Aug 2020 15:37:45 +0000
(15:37 +0000)
committer
Mark Felder
<feld@FreeBSD.org>
Wed, 26 Aug 2020 15:37:45 +0000
(15:37 +0000)
lib/pleroma/helpers/media_helper.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/helpers/media_helper.ex
b/lib/pleroma/helpers/media_helper.ex
index db0c4b0cf11148b6dcc01c90a8ee79bd68c7b83e..3256802a043eed23e869e4e3ca182a1a90be6b1a 100644
(file)
--- a/
lib/pleroma/helpers/media_helper.ex
+++ b/
lib/pleroma/helpers/media_helper.ex
@@
-27,6
+27,7
@@
defmodule Pleroma.Helpers.MediaHelper do
quality = options[:quality] || 85
resize = Enum.join([max_width, "x", max_height, ">"])
args = [
quality = options[:quality] || 85
resize = Enum.join([max_width, "x", max_height, ">"])
args = [
+ "-interlace", "Plane",
"-resize", resize,
"-quality", to_string(quality)
]
"-resize", resize,
"-quality", to_string(quality)
]
@@
-36,7
+37,7
@@
defmodule Pleroma.Helpers.MediaHelper do
defp prepare_resize_args(_), do: {:error, :missing_options}
defp run_fifo(fifo_path, env, executable, args) do
defp prepare_resize_args(_), do: {:error, :missing_options}
defp run_fifo(fifo_path, env, executable, args) do
- args = List.flatten([fifo_path, args, "jpg:
fd:1
"])
+ args = List.flatten([fifo_path, args, "jpg:
-
"])
pid = Port.open({:spawn_executable, executable}, [:use_stdio, :stream, :exit_status, :binary, args: args])
fifo = Port.open(to_charlist(fifo_path), [:eof, :binary, :stream, :out])
true = Port.command(fifo, env.body)
pid = Port.open({:spawn_executable, executable}, [:use_stdio, :stream, :exit_status, :binary, args: args])
fifo = Port.open(to_charlist(fifo_path), [:eof, :binary, :stream, :out])
true = Port.command(fifo, env.body)