Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Add Icon to Image File' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Add Icon to Image File
Authored by: mr. applescript on Sep 25, '07 09:15:26AM
To add or update an icon using SIPS or Image Events, just open and save the file using the with icon parameter. THe preview will be automatically generated:
set this_file to choose file of type "public.image" without invisibles
try
	tell application "Image Events"
		-- start the Image Events application
		launch
		-- open the image file
		set this_image to open this_file
		-- save the changes
		save this_image with icon
		-- purge the open image data
		close this_image
	end tell
on error error_message
	display dialog error_message
end try


[ Reply to This | # ]
Add Icon to Image File
Authored by: ploesslkh on Sep 25, '07 09:34:26AM

I tried this script but it did not retain the old creation date but changed it to todays!! Maybe I misunderstand how to use this apple script?



[ Reply to This | # ]
Add Icon to Image File
Authored by: JimMueller on Sep 25, '07 06:37:48PM
The whole idea of the original hint was to avoid changing the files' timestamps.

[ Reply to This | # ]