Eae*_*Eae 0 powershell imagemagick
PS C:\ImageMagick> convert -background transparent -fill hsb(0%,0%,0%) -font Arial -pointsize 18 -size 18x26 -gravity center label:p "output2.png"
At line:1 char:51
+ convert -background transparent -fill hsb(0%,0%,0%) -font Arial -pointsize 18 -s ...
+ ~
You must provide a value expression following the '%' operator.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : ExpectedValueExpression
Run Code Online (Sandbox Code Playgroud)
上面的命令在cmd窗口中没有任何问题,在PowerShell中引发了一个错误,我在上面粘贴了它.我看了很多文章,但还没有找到一个好的解决方案.
我或许他们正在谈论hsb我在引文中包围的电话:
PS C:\ImageMagick> convert -background transparent -fill "hsb(0%,0%,0%)" -font Arial -pointsize 18 -size 18x26 -gravity center label:p "output2.png"
Invalid Parameter - transparent
Run Code Online (Sandbox Code Playgroud)
这只会导致一个不同的问题.我试过用命令加前缀&,这是我以前不熟悉的技术,但似乎没有解决任何问题.
PowerShell不使用当前目录作为查找命令的宫殿.所以convert解决了C:\Windows\System32\convert.exe
Get-Command convert|ft CommandType,Name,Definition
# CommandType Name Definition
# ----------- ---- ----------
# Application convert.exe C:\Windows\System32\convert.exe
Run Code Online (Sandbox Code Playgroud)
如果convert.exe要从当前目录中调用.\convert而不是convert.
| 归档时间: |
|
| 查看次数: |
1603 次 |
| 最近记录: |