Image Events and Unicode
Image Events and Unicode
- Subject: Image Events and Unicode
- From: DizzyPenguin <email@hidden>
- Date: Mon, 2 May 2005 18:19:53 +0100
Hi all,
Getting the properties of an image using the following standard Apple example:
set this_file to (choose file) as Unicode text
try
tell application "Image Events"
launch
set this_image to open this_file
set the image_props to the properties of this_image
close this_image
end tell
on error error_message
display dialog error_message
end
--> {bit depth:millions of colors, file type:JPEG, image file:file "Macintosh HD:Users:me:Desktop:Athlete - Tourist", folder "Macintosh HD:Users:me:Desktop:", resolution:{72.0, 72.0}, image, dimensions:{500.0, 497.0}, name:"Athlete - Tourist", color space:RGB}
Now renaming the same file to "Athlète - Tourist" returns this in the Event Log:
--> {bit depth:missing value, file type:missing value, image file:file "Macintosh HD:me:vlak:Desktop:Athlète - Tourist", folder "Macintosh HD:Users:me:Desktop:", resolution:{}, image, dimensions:{}, name:"Athlète - Tourist", color space:missing value}
Notice the lack of values for
resolution and
dimensions
Why?
And on a related note, I tried to use "sips", but how do you get
do shell script to understand Unicode text (accented characters)? Or with any other command for that matter.
set file_ to (choose file) as Unicode text
--> alias "Macintosh HD:Users:me:Desktop:Athlete - Tourist"
set path_ to quoted form of POSIX path of file_
word -1 of (do shell script "sips -g format " &
--> "jpeg"
Now the same file with accented character:
--> alias "Macintosh HD:Users:me:Desktop:Athlète - Tourist"
--> "Can't get last word of \"\"."
Help!
--
Regards,
Guy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden