簡體   English   中英

ImageMagick bash腳本問題

[英]ImageMagick bash script issue

// This works
convert ${path}${dst} -crop ${crop} ${path}${dst}

// but when changed to this, it fails
convert ${path}${src} -trim ${path}${dst}
convert ${path}${dst} -crop ${crop} ${path}"pdf_"${dst}

我究竟做錯了什么?

是否更改此:

convert ${path}${dst} -crop ${crop} ${path}"pdf_"${dst}

對此:

convert ${path}${dst} -crop ${crop} "${path}pdf_${dst}"

救命?

對我來說很好。

$ path=./
$ src=test.jpg
$ dst=test2.jpg
$ crop=100x100+10+10
$ convert ${path}${src} -trim ${path}${dst}
$ convert ${path}${dst} -crop ${crop} ${path}pdf_${dst}
$ identify pdf_test2.jpg
pdf_test2.jpg JPEG 100x100 100x100+0+0 DirectClass 8-bit 3.30078kb

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM