applescript - How do I set the new resolution of an image
问题描述
I am a segment of my script where I scale down an image from 1200 dpi to 300 dpi.
I am trying to do this:
repeat with i in input
tell application "Image Events"
launch
set my_image to open i
set resolution to {300,300}
set color space to CMYK
save my_image as TIFF
but resolution is read only????
How can I set the new resolution of an image?
解决方案
我想你需要打电话sips
给你设置它:
do shell script "sips -s dpiHeight 300 -s dpiWidth 300 " & my_image
推荐阅读
- android - Unity Build失败:启用更新SDK,如何解决?
- alfresco - 使用移动操作时如何覆盖文件,无论文件在露天中是否存在同名?
- elixir - 不处理强制转换的事件处理程序的 GenServer 实现
- flutter - AndroidX 不兼容导致 Flutter Gradle 失败
- r - shp文件打不开
- android - TextInput Bubble 不会长时间触摸:Kivy
- node.js - 使用 xml-js 解析器从 xml 转换后无法访问 json 值
- mysql - 如何在windows容器中绑定挂载数据目录
- mysql - Mysql结果表在while循环中加入多个SELECT结果
- pandas - Pandas 系列:将 DateTime 递减 100 年