Applescript 图像事件:相同的脚本在一台Mac上另存为RGB JPEG,在另一台Mac上另存为CMYK JPEG
以下是违规代码:Applescript 图像事件:相同的脚本在一台Mac上另存为RGB JPEG,在另一台Mac上另存为CMYK JPEG,applescript,image-events,Applescript,Image Events,以下是违规代码: repeat with this_indd_jpeg in indd_jpeg_list set original_name to name of this_indd_jpeg set the_small_path to export_path & original_name as string set the_large_path to (Large_Folder as string) & original_name as string tel
repeat with this_indd_jpeg in indd_jpeg_list
set original_name to name of this_indd_jpeg
set the_small_path to export_path & original_name as string
set the_large_path to (Large_Folder as string) & original_name as string
tell application "Image Events"
launch
set this_image to open (this_indd_jpeg as alias)
scale this_image to size target_length_large
save this_image as JPEG in file the_large_path with icon
scale this_image to size target_length_small
save this_image as JPEG in file the_small_path with icon
close this_image
end tell
end repeat
问题在于,在一个Mac(10.7.5)上,它将JPEG保存为RGB格式(所需的行为),而在另一个Mac(10.6.8)上,它将JPEG保存为CMYK格式,这显然是不需要的
是否有人知道10.6和10.7中的Image Events版本之间存在任何变通方法或差异?我也不确定,这只是一种暗中的试探
干杯 我不知道10.7.5和10.6.8之间图像事件的区别。但您可以尝试使用sips更改颜色空间:
set theImage to quoted form of POSIX path of (the_large_path)
do shell script "/usr/bin/sips -m '/System/Library/ColorSync/Profiles/Generic RGB Profile.icc' " & " " & theImage
到处都是错误。最常见的是
page1.jpg不是有效的文件跳过。错误4:未指定任何文件
。有什么想法吗?该代码旨在添加到end tell和end repeat语句之间。在这一点上,大路径的内容是什么?啊,我明白了<代码>大路径为将大路径设置为(大文件夹为字符串)&原始名称为字符串
Large\u文件夹
是将Large\u文件夹设置为导出路径&“Large:”为字符串
original\u name
是将original\u name设置为此索引的名称\u jpeg
此indd_jpeg
是使用将indd_jpeg_列表设置为(名称以“页面”开头,名称以“.jpg”结尾的(导出路径为别名)的每个文件)生成的列表的成员。
。