I’m trying to figure out a way to save for web out of PS CS2 and I’m having mixed results.
I can get the script to save the file as jpeg, but it keeps the name of the original tif file. I’d like to be able to get the name without the extension.
Here is what I have…
property type_list : {"TIFF", "JPEG", "PNGf", "PICT"}
property extension_list : {"tif", "tiff", "jpg", "jpeg", "png", "pict", "pct"}
tell application "Finder"
activate
try
set these_items to the selection
repeat with i from 1 to the count of these_items
set this_item to item i of these_items
if the file type of this_item is in the type_list or ¬
name extension of this_item is in the extension_list then
set this_path to this_item as string
set thisFile to this_item as alias
tell application "Adobe Photoshop CS2"
activate
set ruler units of settings to pixel units
open thisFile showing dialogs never
--set myOptions to {class:JPEG save options, embed color profile:false, quality:7}
--set myExportOptions to {«class fltp»:JPEG, quality:40}
set myOptions to {class:save for web export options, as:JPEG, quality:60}
-- Run Photoshop action to USM, convert to CMYK
set docRef to current document
--resizing images proportionaly and non proportionaly scaled
resize image docRef width (90) height (90) resolution (72) resample method bicubic sharper
export docRef as save for web with options myOptions in file (thisFile as string) --appending lowercase extension
--save docRef as JPEG with options myOptions in file (thisFile as string) appending lowercase extension
close current document saving no
end tell
end if
end repeat
on error error_message
display dialog error_message buttons {"OK"} default button 1
end try
end tell
Note that if you want the script to compile you have to change the {class:save for web export options, as:JPEG, quality:60} with {class:save for web export options, «class fltp»:JPEG, quality:60}. This was mention in another thread.
This is realy annoying, so if anybody has a solution for this, it would be great.
The final goal here is to be able to save 2 copies of each file in the same path they are right now. So for exemple if I have…
Folder1
Folder1_1
image1.tif
image2.tif
image3.tif
image4.tif
Folder1_2
image1.tif
image2.tif
image3.tif
image4.tif
Folder1_3
image1.tif
image2.tif
image3.tif
image4.tif
I’d like to be able to save those jpeg in each of those folders. The name of the image are the same from one folder to the other. I’d use the save for web because it gives me much smaller file size then just save as jpeg which I could do with Russel brown’s services. I’d also like to rename the image file as image1.jpg and image1t.jpg. The first having a resize of 470 pixel and the second one would be a thumbnail at 90 pixel.
If you have a script that will do that please post it here. If you know how to do part of it or just want to help, please do:-)
TIA
Jeff