{{{tell application "Finder" to set homePath to (home as string)
tell application "Adobe Photoshop CS"
- activate
open (homePath & "Desktop:bikemap.pdf" as alias) crop current document bounds {46, 72, 1276, 1220} make new art layer at beginning of current document ¬
with properties {name:"MarkerLayer", blend mode:normal}
var selectionChannel = new ActionReference();
- selectionChannel.putProperty( charIDToTypeID( \"Chnl\" ), charIDToTypeID( \"fsel\" ) );
var makeSelection = new ActionDescriptor();
- makeSelection.putReference( charIDToTypeID( \"null\" ), selectionChannel );
var selectionParameters = new ActionDescriptor();
- selectionParameters.putUnitDouble( charIDToTypeID( \"Top \" ), charIDToTypeID( \"#Pxl\" ), selTop ); selectionParameters.putUnitDouble( charIDToTypeID( \"Left\" ), charIDToTypeID( \"#Pxl\" ), selLeft ); selectionParameters.putUnitDouble( charIDToTypeID( \"Btom\" ), charIDToTypeID( \"#Pxl\" ), selBottom ); selectionParameters.putUnitDouble( charIDToTypeID( \"Rght\" ), charIDToTypeID( \"#Pxl\" ), selRight ); makeSelection.putObject( charIDToTypeID( \"T \" ), charIDToTypeID( selShape ), selectionParameters ); makeSelection.putUnitDouble( charIDToTypeID( \"Fthr\" ), charIDToTypeID( \"#Pxl\" ), featherAmt ); makeSelection.putBoolean( charIDToTypeID( \"AntA\" ), antiAlias );
executeAction( charIDToTypeID( \"setd\" ), makeSelection, DialogModes.NO );
- with arguments {selShape, selTop, selLeft, selBottom, selRight, antiAlias, featherAmt}
- {class:RGB color, red:81, green:172, blue:205} blend mode ¬ vivid light opacity 90 without preserving transparency
save current document in (homePath & "Desktop:pdx.png") as PNG quit
end tell
on geoToPixel(latitude, longitude)
- -- Burnside Bridge 45.523 -122.667 -- Pioneer Square 45.519 -122.686 -- Map Pixel Center 520, 647
end geoToPixel}}}

