How I can delete an image (move it into the trash) from applescript by giving the filename and path of the image locate on the drive.
This script will be started from the shell and may get the (valid) filename including the path (size or other properties if needed) as parameter.
So far I could manage to select the image by name (which is the filename usually) and set a comment on it. So I can search for that comment and delete all images with that comment at once. But with random image names this is not possible because you find unrelated pictures for the name.