get_art($_REQUEST['fast']); if (isset($r->art)) { $art = $r->art; $mime = $r->art_mime; $found = 1; } /* Decide what size this image is */ switch ($_REQUEST['thumb']) { case '1': $size['height'] = '75'; $size['width'] = '75'; break; case '2': $size['height'] = '128'; $size['width'] = '128'; break; default: $size['height'] = '275'; $size['width'] = '275'; break; } if (!$found) { // Print a transparent gif instead header('Content-type: image/gif'); readfile(conf('prefix') . conf('theme_path') . "/images/blankalbum.gif"); } else { // Print the album art $extension = substr($mime,strlen($mime)-3,3); header("Content-type: $mime"); header("Content-Disposition: filename=" . $album->name . "." . $extension); if (!$_REQUEST['thumb']) { echo $art; } elseif (!img_resize($art,$size,$extension)) { echo $art; } } ?>