8000 compiler: hide output from image converters (beta-3.0) by mortend · Pull Request #480 · fuse-open/uno · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

compiler: hide output from image converters (beta-3.0) #480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions src/compiler/core/Syntax/UxlProcessor.cs
74BB
Original file line number Diff line number Diff line change
Expand Up @@ -680,23 +680,19 @@ void WriteImageFile(ImageFile f)
else if (OperatingSystem.IsMacOS())
{
// Use the 'sips' command on macOS:
var result = new Shell(Log).Run("sips",
new Shell(Log).GetOutput("sips",
"--resampleHeightWidth " + height + " " + width + " " +
src.QuoteSpace() + " --out " + dst.QuoteSpace());

if (result != 0)
throw new InvalidOperationException("'sips' exited with code: " + result);
src.QuoteSpace() + " --out " + dst.QuoteSpace(),
RunFlags.NoOutput);
}
else
{
// Use the 'convert' command as fallback:
var result = new Shell(Log).Run("convert",
new Shell(Log).GetOutput("convert",
src.QuoteSpace() +
" -resize " + width + "x" + height + "! " +
dst.QuoteSpace());

if (result != 0)
throw new InvalidOperationException("'convert' exited with code: " + result);
dst.QuoteSpace(),
RunFlags.NoOutput);
}
}
}
Expand Down
0