Verified Commit 9bb32724 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

fix convert string

parent a04a7b94
Pipeline #43115 passed with stages
in 6 minutes and 49 seconds
......@@ -91,22 +91,22 @@ object MediaTransformations extends Logging {
*/
def createImageThumbnail(sourceFilePath: String, destFile: String, width: Option[Int], height: Option[Int]): Try[String] = {
val externalCommand =
s"""convert \\
|-filter Triangle \\
|-define filter:support=2 \\
|-thumbnail ${width.getOrElse("")}x${height.getOrElse("")} \\
|-unsharp 0.25x0.08+8.3+0.045 \\
|-dither None \\
|-posterize 136 \\
|-quality 82 \\
|-define jpeg:fancy-upsampling=off \\
|-define png:compression-filter=5 \\
|-define png:compression-level=9 \\
|-define png:compression-strategy=1 \\
|-define png:exclude-chunk=all \\
|-interlace none \\
|$sourceFilePath \\
|$destFile""".stripMargin
s"""convert
|-filter Triangle
|-define filter:support=2
|-thumbnail ${width.getOrElse("")}x${height.getOrElse("")}
|-unsharp 0.25x0.08+8.3+0.045
|-dither None
|-posterize 136
|-quality 82
|-define jpeg:fancy-upsampling=off
|-define png:compression-filter=5
|-define png:compression-level=9
|-define png:compression-strategy=1
|-define png:exclude-chunk=all
|-interlace none
|$sourceFilePath
|$destFile""".stripMargin.replaceAll("\n", " ")
Try {
executeCommand(externalCommand)
destFile
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment