How to apply an image style based on a condition?
If you want to do it in template file, you can access your boolean variable using $node object. You can do following way :

if ($node-&gt;field_boolean[LANGUAGE_NONE][0]['value']) {
  print theme('image_style', array('path' =&gt; $node-&gt;field_image['und'][0]['uri'], 'style_name' =&gt; 'style1_name'));
}
else {
  print theme('image_style', array('path' =&gt; $node-&gt;field_image['und'][0]['uri'], 'style_name' =&gt; 'style2_name'));
}


Or :

If you are using panels, then you can use visibility rule to the fields by adding it twice with different image style.