Editing an image on a Named Clipboard with Imagemagick

Hello, I have an image on a named clipboard on Keyboard Maestro, how can I edit it using this applescript/shell script combo from Imagemagick?

do shell script "convert \" & my Keyboard Maestro image that is on my named clipboard & \" -modulate 100,110, 100 \" & output the edited image to the same named clipboard on Keyboard Maestro\""

This script works if I put the file path of the image in the input and output, but I'm not sure how to pass the named clipboard in and out. (In practice, the image in question wouldn't have been written yet, so no file path but only exists on my named clipboard.)

Any ideas how this could be pulled off? Thanks!

ImageMagick will only work with files, so use the Write to a File action to write the named clipboard to a file, run the shell command, and then use the Read a File action to read it back.


Thanks very much!