I have modest experience with Pixelmator and with AppleScript, but not together. In ApplesScript, I would like to:
1. Open an existing image file (most likely a PNG file).
2. Move to a specific location on that image
3. Color fill the contiguous area at that location with some tolerance (range).
4. Close and save the image
UPDATE:
I have managed to get this far:
tell application "Pixelmator Pro"
activate
set brainRegions to open file ((path to desktop as text) & "Cortical_Areas.png")
tell brainRegions
set {644, 377} to position of layer named "Background Layer"
select color range color {44799, 43263, 29951} range 30
fill layer named "Background Layer" with color {0, 0, 50000, 32768} with preserve transparency
end tell
export brainRegions to file ((path to desktop as text) & "Cortical_Areas_Colored.png") as PNG
quit saving yes
end tell
However, select color range selects all areas of a specified color match. I only want to fill the region "around" a defined point that has contiguous color matching. Any help would be greatly appreciated! Thanks!Using Pixelmator Pro V2.0.5