Can't use PNG-8 with Image Events

Hi

So I’ve corrected the code with the pathnames.
I now have the Image Event to resize and save as JPEG.
It works with JPG, GIF, PNG24 but not with PNG8

I tried it with two types of sources, one saved via “save for web” from CS2 and one PNG i just searched the web.

Anyway, Image Events should be able to scale and save them as JPEG because when I use automator’s “Scale and save as jpg” it works with the PNG8 too.

I tried it with 10.5.8 (MacBook) and 10.6.2 (iMac) but neighter machine works.


on skalieren(filepath, skalieren)
	try
		tell application "Image Events"
			launch
			set this_image to open filepath
			if skalieren is true then
				scale this_image to size 1000
			end if
			save this_image as JPEG
			close this_image
		end tell
	on error error_message
		display dialog error_message
	end try
end skalieren

I tried googling something about image events and png8 but all i came off was how to save an image via applescript and photoshop :slight_smile:
I have to somehow make it work with ImageEvents since ImageMagic is not installed on every mac