gpt4 book ai didi

linux - 在 ubuntu 上运行 ImageMagick 脚本

转载 作者:太空宇宙 更新时间:2023-11-04 04:44:37 25 4
gpt4 key购买 nike

我之前在 Windows 上安装并使用过 Image Magick,并且运行良好。现在我正在尝试让它运行并将其安装在我的 Ubuntu 实例上。我通过对示例图像进行简单的“转换”测试来验证它的工作原理。现在我发现这个网站有有用的基于 Unix 的脚本。 http://www.fmwconcepts.com/imagemagick/textcleaner/index.php

我的问题是如何运行这些脚本之一。例如,我将“textcleaner”脚本复制到我的主文件夹 /usr/home

如何按照使用说明运行脚本?

USAGE: textcleaner [-r rotate] [-l layout] [-c cropoff] [-g] [-e enhance ] [-f filtersize]
[-o offset] [-u] [-t threshold] [-s sharpamt] [-s saturation] [-a adaptblur] [-T]
[-p padamt] [-b bgcolor] infile outfile

当我从存储 textcleaner 脚本的同一文件夹运行命令时,如命令“textcleaner”中所示,它不执行任何操作,仅显示消息“未找到命令”
所以这实际上是一个关于如何注册这个脚本的问题(如果这是正确的说法的话)。

最佳答案

您需要使脚本可执行。

chmod +x textcleaner

然后直接执行...

./textcleaner [options]

如果您想让脚本在系统范围内可用,只需将其安装到 /usr/local/bin 即可。

sudo cp -p ./textcleaner /usr/local/bin/textcleaner
# Or even just
sudo install textcleaner /usr/local/bin

关于linux - 在 ubuntu 上运行 ImageMagick 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44461539/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com