Watermarking an image that is not in the Drupal filesystem using image_style I get an image through the ImageMagick PHP extension because I don't want to start the PHP exec() function. This works.

But I'm not managing to create a watermarked image using image_style because this image is not in the Drupal file system.

How can I do this?
As you've probably already seen about theme_image_style():


  This function does not work with images outside the files directory nor with remotely hosted images. This should be in a format such as 'images/image.jpg', or using a stream wrapper such as 'public://images/image.jpg'.


There's a beta release of a module called Imagecache External which claims to solve the problem:


  Imagecache External is a utility module to allow you to use imagecache(D6)/image derivatives (D7) with external images.


With that module installed your use of theme_image_style() would be replaced with something like:

print theme('imagecache_external', array('path' =&gt; $path, 'style_name'=&gt; 'thumbnail'));