Choosing Quality of Images

I created this application which produces WebAlbums of your digital images, but I’d like the user to choose a ‘Quality’ and the make the app. compress the images. I think this isn’t possible is it?
Or; do you need to add some kind of ‘add-on’ to your package?
I use the following [kind-of] to resize:


	tell application "Image Events"
		launch
		set this_image to open this_file
		scale this_image to size 640
		save this_image -- is there no way to set jpg quality?
		close this_image
	end tell

I know that the free applescripting tool YVS Picture Translator can do this, since I wrote it.

You can download it from:

http://homepage.mac.com/ktam2/yvs/YVSPictTrans130.sit.hqx

Kevin