How to add a image style to an image in a template file?
The docs page has it pretty much covered but here's an example if you're struggling:

$style_vars = array(
  'style_name' =&gt; $style_name,
  'path' =&gt; $image_path,
  'alt' =&gt; $alt_text
);

$image = theme('image_style', $style_vars);

$link = l($image, $url, array('html' =&gt; TRUE));