I've got a challenge for the math-a-magicians out there.
Using the script below on a picture 3264x2448 i get a result in the display Dialog for 499 pixels.
set theFile to choose file
tell application "System Events"
activate
end tell
tell application "GraphicConverter"
activate
open theFile
tell application "System Events"
activate
end tell
tell window 1
set {picWidth, picHeight} to image dimension
set hSize to picWidth
end tell
set scale_500_Factor to (1 / hSize) * 500
scale window 1 horizontal scale_500_Factor vertical scale_500_Factor
tell window 1
set {picWidth, picHeight} to image dimension
end tell
tell application "System Events"
activate
display dialog "Width=" & picWidth
end tell
-- save window 1 in (destFldr & theName & "_500")
close window 1 saving no
end tell
Robert Poland - Fort Collins, CO