使用 ANT 将 PSD 转换为 PNG/JPG
我正在研究构建过程,并想到将 PSD 存储在我们的存储库中,这样当构建开始时,我们可以将 PSD 文件转换为 PNG/JPG 图像。这会很棒,因为我们不会一遍又一遍地重新转换相同的压缩文件,而且它还允许我们更改图像压缩率,而不会对最终输出产生任何负面影响......这意味着我们有一天可以压缩为 60 %,然后升至 80%。
有谁知道使用 ANT 任务或 Bash 实现此目的的库或方法?
I am playing around with build processes and the idea came up to store our PSD's in our repository so when a build kicks off we can convert the PSD files to PNG/JPG images. This would be great because we wouldn't be reconverting the same compressed file over and over again and it would also allow us to change the image compression rate without any negative impacts to the final output...meaning we could one day compress at 60% and then go up to 80%.
Does anyone know of a library or way to accomplish this with an ANT taks or Bash?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ANT 中实际上有一个图像任务。但我怀疑它是否可以处理 PSD 文件。
另一种选择是使用外部工具,例如 imagemagick 包中的
convert
:convert
有大量用于裁剪/缩放/设置质量和压缩的选项,因此应该适合您的需求。There is actually an image task in ANT. I doubt however that it can handle PSD files though.
Another option is to use an external tool such as
convert
from the imagemagick package:convert
has tons of options for cropping / scaling / setting quality and compression as well, so it should suit your needs.