Ranchero's Big Cat Scripts plugin

Ranchero's Big Cat Scripts plugin lets you run Applescripts and shell scripts from a contextual (right-click) menu on a selected file or folder. Scripts are stored in ~/Library/Application Support/Big Cat Scripts/Files. Here's a script to convert any image file to PNG:

on main(filelist)
	repeat with this_file in filelist
		set the target_path to (choose file name default name "newimage.png") as string
		try
			tell application "Image Events"
				launch
				-- open the image file
				set this_image to open this_file
				-- save in new file
				save this_image as PNG in file target_path with icon
				-- purge the open image data
				close this_image
			end tell
		         on error error_message
			         display dialog error_message
		end try
	end repeat
end main
Open in Script Editor