How do I programmatically get a styled version of an image via imagecache in D7? I want to save locally to the server, a styled version of an image attached to a node. "Styled" as in  filtered through a custom image style that I have already configured. What is the correct function, I can't find it anywhere. 

I have file_unmanaged_copy() of the original image working fine, I can't see how to retrieve a styled version.
theme_image_style. Imagecache is replaced by image style in Drupal 7.
Example:

print theme('image_style',array('style_name' =&gt; 'thumbnail', 'path' =&gt; 'path/to/image'));