【问题标题】:add a certain page to the end of a multi pages tif files comand line ImageMagick将某个页面添加到多页 tiff 文件命令行 ImageMagick 的末尾
【发布时间】:2018-09-07 08:22:31
【问题描述】:

我正在使用 Windows 8.1 和 ImageMagick-7.0.8-11-portable-Q16-x86 我只需要一个批处理文件,将某个图像添加到每个多页 tif 文件的末尾

for example:
i have a folder contain:
usa.tif     (1 pages) 
england.tif (2 page)
brazil.tif  (3 pages)
egypt.tif   (4 pages)
france.tif  (5 pages)
xxxxx.tif   (x pages)

i want to add or append flag.png as a page to the end each tif image above

so output will be like this:

usa.tif     ( 2 pages ) 
england.tif ( 3 pages )
brazil.tif  ( 4 pages )
egypt.tif   ( 5 pages )
france.tif  ( 6 pages )
xxxxx.tif   (x+1 pages)

附言 (这个文件夹每天都会有一个新文件,新名称) 谢谢:)

【问题讨论】:

    标签: loops append imagemagick add tiff


    【解决方案1】:

    这很简单......

    magick input.tif flag.png output.tif
    

    理想情况下,您应该创建一个 powershell 脚本来遍历目录中的所有文件。

     Get-ChildItem "C:\Full\Path\To\Files" -Filter *.tif -Exclude "output_*" |
     Foreach-Object {
          $input = Get-Content $_.FullName
          $output = "output_" + $input
          magick.exe $input flag.png $output
     }
    

    我从不使用 Windows 平台,所以我不知道上面的示例是否有正确的语法,但它应该可以帮助您入门。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-01
      • 1970-01-01
      相关资源
      最近更新 更多