I am having difficulty with the PhotoShop CS scripting of saving a GIF image.
Does the export function not work either? The seems to work but there is no file being created at the destination.
Here is an example of the type of script I would like to use:
property W170X170 : "Macintosh HD3:Scripts:ImagesDone:170X170:" as alias
set this_file to choose file with prompt "Choose an image to Process"
set the newGIF_name to my add_extension(this_file, "gif")
tell application "Adobe Photoshop CS"
activate
set display dialogs to never
with timeout of 180 seconds
open this_file
end timeout
set docRef to the current document
-- Convert the document to a document mode that supports saving as jpeg
if (mode of docRef is not RGB) then
change mode docRef to RGB
end if
if (bits per channel of docRef is sixteen) then
set bits per channel of docRef to eight
end if
resize image current document width 170.0 as pixels height 170.0 as pixels
try
set GIF89aOptions to {class:GIF save options, dither:diffusion, dither amount:75, palette:local adaptive, colors in palette:100, forced colors:none, transparency:false, preserve exact colors:true, interlaced:false}
on error error_message
display dialog error_message
end try
with timeout of 300 seconds
try
save docRef in file newGIF_name of W170X170 as CompuServe GIF with options GIF89aOptions appending lowercase extension with copying
on error error_message
display dialog error_message
end try
end timeout
close docRef without saving
end tell
on add_extension(this_file, new_extension)
set this_info to the info for this_file
set this_name to the name of this_info
set this_extension to the name extension of this_info
if this_extension is missing value then
set the default_name to this_name
else
set the default_name to text 1 thru -((length of this_extension) + 2) of this_name
end if
return (the default_name & "." & the new_extension)
end add_extension