Hey Martin,
basicaly you need to check for portrait or landscape oriented image first:
$options = array('cropping'=>true, 'upscaling'=>false); // cropping => true is default and same like 'center'
foreach($page->images as $img) {
if($img->width > $img->height) { // check for orientation
$thumb = $img->size(200, 100, $options); // we have a landscape oriented image
} else {
$thumb = $img->height(100, $options); // we have a portrait oriented image
}
// output your markup here
echo "<img src='{$thumb->url}' alt='{$thumb->description}' />";
}
In your special case you need to check for landscape oriented images that have a width more than two times the height:
if($img->width > (2 * $img->height)) { // check for images with more than two times the width compared to the height
$thumb = $img->size(200, 100, $options); // we have a landscape oriented image
} else {
$thumb = $img->height(100, $options); // we have a portrait oriented image
}