Graphic Converter Swap Colors, how do you define RGB color?

Hi All, I am working on a script using Graphic Converte to swap out white (255, 255, 255) with a light yellow (255, 253, 250). I just can’t seem to get graphic converter to do it. Here’s the script I have working so far…

set blah to choose file
try
tell application “GraphicConverter”
silentopen blah
delay 2
tell window 1
swap colors color {255, 255, 255} with {255, 254, 250}
end tell
– close window 1
end tell
on error errmsg
display dialog errmsg
end try

It opens up the selected file and doesn’t give any errors…
Here’s the event log:

tell current application
choose file
alias “MyMac:Users:ctan:Desktop:2rgb.tif”
end tell
tell application “GraphicConverter”
silentopen alias “MyMac:Users:ctan:Desktop:2rgb.tif”
swap colors window 1 color {255, 255, 255} with {255, 254, 250}
0
end tell

I’v also tried to use these swap color format with no luck.

	swap colors color "000000" with "FFFF00"
	swap colors color "#000000" with "#FFFF00"
	swap colors color "white" with "yellow"

Does anybody know how to declare colors in RGB for Graphic Converter?

Thanks

Chris

You can only swap colors if there’s a color table for the image, the colors to be swapped have to be in the table, and there’s only a color table if all of the colors are 8-bit colors.

I am able to swap the colors by hand even if it isn’t a tabled color image (GIF). Since I can do it outside of Applescript, shouldn’t be doable inside of applescript? Or is it an issue with Graphic Converter that won’t allow me to do it via Applescript?

thanks

chris

Should be doable, yes - but I’ve tried every variation I could think of in 15 minutes and got nowhere but error messaged. Seems like a good time to write to the author (who is usually responsive). That included getting the color table of the GIF I was looking at and referring to the swap by item number in the table.

Thanks!

That worked, I ended up going straight to the source by emailing Lemke Software, but he had the exact same answer as you. So now I just need to “make it work”.

Thanks all again.

chris