我的图像处理需要的命令行工具。

imgwrench的Python项目详细描述


图像扳手

https://img.shields.io/pypi/v/imgwrench.svghttps://img.shields.io/travis/luphord/imgwrench.svgDocumentation Status

我的图像处理需要的命令行工具多个子命令可以 按顺序执行以形成处理管道。

使用量

Usage: imgwrench [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...

The main command line interface function of imgwrench

Options:
-i, --image-list FILENAME  File containing paths to images for processing,
                        defaults to stdin
-p, --prefix TEXT          prefix for all output filenames before numbering
                        [default: img_]
-d, --digits INTEGER       number of digits for file numbering  [default: 4]
-c, --increment INTEGER    increment for file numbering  [default: 1]
-k, --keep-names           keep original file names instead of numbering
                        [default: False]
-f, --force-overwrite      force overwriting output image file if it exists
                        [default: False]
-o, --outdir DIRECTORY     output directory  [default: .]
-q, --quality INTEGER      quality of the output images, integer 0 - 100
                        [default: 88]
-e, --preserve-exif        preserve image exif headers if available
                        [default: False]
--help                     Show this message and exit.

Commands:
blackwhite  Convert color images to black and white.
colorfix    Fix colors by stretching channel histograms to full range.
crop        Crop images to the given aspect ratio.
frame       Put a monocolor frame around images.
framecrop   Crop and frame an image to a target aspect ratio.
resize      Resize images to a maximum side length preserving aspect...
save        No-op to enable saving of images without any processing.
stack       Stack images vertically, empty space in the middle.

功能

  • 子命令可以按顺序执行以形成管道
  • 命令black white将图像转换为黑白
  • < L>命令> {EM1}$CalpFixeEEM >固定老照片颜色
  • 命令crop用于裁剪图像以提供纵横比
  • 命令dither用于将图像转换为黑白和抖动
  • 命令filmstrip水平堆叠图像形成filmstrip
  • 命令frame在图像周围放置单色边框
  • 命令frame crop顶部帧并将图像裁剪为目标纵横比
  • 用于调整图像大小的命令resize
  • 命令save不进行处理,而是使用给定参数保存图像
  • 命令stack用于垂直堆叠图像

管道

imgwrench子命令可以合并到管道中这样可以避免生成中间层 文件会使文件系统变得凌乱,并降低最终结果的质量。例如,如果你 要将当前目录中的所有图像转换为黑白,请放置一个白色框架 在它们周围,将它们切割成3:2的宽高比(用于标准格式打印),您可以 执行以下命令:

ls *.JPG | \
imgwrench -o out -q 95 -p oldschool_img_ \
        blackwhite \
        framecrop -a 3:2 -w 0.03 -c white

请参考detailed subcommand documentation中的各个参数

学分

这个包是用Cookiecutteraudreyr/cookiecutter-pypackage项目模板创建的

历史

0.8.0(2019-07-10)

  • 抖动子命令
  • filmstrip子命令水平堆叠图像
  • 可以使用–PNG CLI标志以PNG格式保存图像

0.7.1(2019-05-16)

  • 修复开发状态

0.7.0(2019-05-16)

  • 保存ExIF图像元数据
  • 的选项
  • 使用-k/–保留名称运行时修复错误
  • 状态进展到Alpha

0.6.0(2019-03-14)

  • frame crop子命令将图像裁剪并框显为目标纵横比,包括测试和文档
  • 中断更改:将命令模块移动到命令
  • 引入imageinfo作为管道中附加元信息的容器
  • 增加测试覆盖率
  • 更多文档

0.5.2(2019-03-10)

  • 对颜色使用自定义参数类型

0.5.1(2019-03-09)

  • 将默认帧宽度更改为0.025
  • frame子命令的用法文档
  • 子命令的一致字母排序
  • 对比率使用自定义参数类型

0.5.0(2019-03-07)

  • black white子命令,用于将彩色图像转换为黑白图像;包括doc
  • frame子命令在图像周围放置单色边框;包括测试

0.4.0(2019-02-26)

  • 将RGBA模式的PNG图像转换为RGB(以启用另存为JPG)
  • 裁剪子命令将图像裁剪为指定的纵横比
  • colorfix和crop文档

0.3.0(2019-02-17)

  • -d/–digits选项指定文件名中的位数
  • -c/–用于定义文件编号增量的增量选项
  • 创建不存在的输出文件夹,而不是申诉< /LI>

0.2.0(2019年-01-30)

  • 无操作保存命令,仅用于保存图像
  • 如果输出图像已经存在
  • 则引发异常
  • -f/–强制覆盖标志以启用覆盖输出
  • cli、pipeline和resize测试

0.1.1(2019-01-29)

  • 修复主模块

0.1.0(2019-01-29)

  • pypi上的第一个版本。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java应用程序不是在Eclipse中运行,而是在命令行中运行   swing Java图形组件问题。似乎找不到错误   我需要键盘。close();让代码正常工作?   Springboot中的java HttpSession   抽象语法树我想添加一个语句。我试图解析它,java解析器异常被抛出。如何克服它?   java Hibernate:清理会话   具有不连续子集的java划分问题   java正则表达式查找最后一个冒号后的字符串   java从SpringShell执行OS命令   Java扫描器字符串输入   java字符串索引越界异常(charAt)   java执行器服务终止被卡住   Springockito没有继承java@ContextConfiguration   java如何为一个servlet映射多个url   java安卓获取命令的stderr   java生成类型。表:数据库中的大数字   安卓 Getter Setter返回NothingJava