$all_fcs]); $resources = get_resource_data_batch($resources); } } if (count($resources) == 0) { exit(escape($lang["embedslideshow_notavailable"])); } foreach ($resources as $resource) { $file_path = get_resource_path($resource["ref"], true, $size, false, $resource["preview_extension"], -1, 1, $use_watermark); if (file_exists($file_path)) { $preview_path = get_resource_path($resource["ref"], false, $size, false, $resource["preview_extension"], -1, 1, $use_watermark); } else { # Fall back to 'pre' size $preview_path = get_resource_path($resource["ref"], false, "pre", false, $resource["preview_extension"], -1, 1, $use_watermark); } $preview_path .= "&k=" . $k; # Sets height and width to display if ( !isset($resource["thumb_width"]) || $resource["thumb_width"] < 1 || !isset($resource["thumb_height"]) || $resource["thumb_height"] < 1 ) { # No Preview Available continue; } $ratio = $resource["thumb_width"] / $resource["thumb_height"]; if ($ratio > $player_ratio) { // Base on the width unless we have been asked to scale to specific width # Landscape image, width is the largest - scale the height $width = $player_width - 8; $height = floor($width / $ratio); } else { $height = $player_height; $width = floor($height * $ratio); } ?>