Oops, it seems that I am tired.
What is returned by this script under Catalina ?
set theFile to choose file of type {"public.png", "public.jpeg"}
tell application "Image Events"
set openedFile to open file (theFile as string)
properties of openedFile
scale openedFile to size 800
save openedFile with icon
close openedFile
set openedFile to open file (theFile as string) -- with Catalina
properties of openedFile
end tell
Here I got :
Don't click that, it's a log history
(case 1 .png)
tell application "Script Editor"
choose file of type {"public.png", "public.jpeg"}
--> alias "SSD 1000:Users:**********:Desktop:##29381 copie.png"
end tell
tell application "Image Events"
open file "SSD 1000:Users:**********:Desktop:##29381 copie.png"
--> image "##29381 copie.png"
get properties of image "##29381 copie.png"
--> {color space:RGB, image file:file "SSD 1000:Users:**********:Desktop:##29381 copie.png", bit depth:millions of colors, dimensions:{1023, 658}, location:folder "SSD 1000:Users:**********:Desktop:", embedded profile:profile "iMac" of image "##29381 copie.png", file type:PNG, class:image, name:"##29381 copie.png", resolution:{72.0, 72.0}}
scale image "##29381 copie.png" to size 800
save image "##29381 copie.png" with icon
--> file "SSD 1000:Users:**********:Desktop:##29381 copie.png"
close image "##29381 copie.png"
open file "SSD 1000:Users:**********:Desktop:##29381 copie.png"
--> image "##29381 copie.png"
get properties of image "##29381 copie.png"
--> {color space:RGB, image file:file "SSD 1000:Users:**********:Desktop:##29381 copie.png", bit depth:millions of colors, dimensions:{800, 514}, location:folder "SSD 1000:Users:**********:Desktop:", embedded profile:profile "iMac" of image "##29381 copie.png", file type:PNG, class:image, name:"##29381 copie.png", resolution:{72.0, 72.0}}
end tell
#-----------
(case 2 .jpg)
tell application "Script Editor"
choose file of type {"public.png", "public.jpeg"}
--> alias "SSD 1000:Users:**********:Desktop:##29378.jpg"
end tell
tell application "Image Events"
open file "SSD 1000:Users:**********:Desktop:##29378.jpg"
--> image "##29378.jpg"
get properties of image "##29378.jpg"
--> {color space:RGB, image file:file "SSD 1000:Users:**********:Desktop:##29378.jpg", bit depth:millions of colors, dimensions:{1200, 1600}, location:folder "SSD 1000:Users:**********:Desktop:", embedded profile:missing value, file type:JPEG, class:image, name:"##29378.jpg", resolution:{72.0, 72.0}}
scale image "##29378.jpg" to size 800
save image "##29378.jpg" with icon
--> file "SSD 1000:Users:**********:Desktop:##29378.jpg"
close image "##29378.jpg"
open file "SSD 1000:Users:**********:Desktop:##29378.jpg"
--> image "##29378.jpg"
get properties of image "##29378.jpg"
--> {color space:RGB, image file:file "SSD 1000:Users:**********:Desktop:##29378.jpg", bit depth:millions of colors, dimensions:{600, 800}, location:folder "SSD 1000:Users:**********:Desktop:", embedded profile:profile "sRGB IEC61966-2.1" of image "##29378.jpg", file type:JPEG, class:image, name:"##29378.jpg", resolution:{72.0, 72.0}}
end tell