- name: $file_name
";
$image_file = "$dir_name/$file_name";
$image_size = getimagesize($image_file, &$image_info);
while(list($key, $value) = each($image_size))
{
// make the output easier to read
switch($key){
case 0: $key = " - width: "; break;
case 1: $key = "
- height: "; break;
case 2: $key = "
- type: "; break;
case 3: $key = "
- string:
"; break;
case bits: $key = "bits per sample:"; break;
}
if ($key == "type"){
switch($value){
case 1: $value = "GIF image"; break;
case 2: $value = "jpeg image"; break;
case 3: $value = "PNG image"; break;
}
}
$file_list .= ($key . $value . " \n");
}
// close that part of the table and make the next one for the image
$file_list .= " |
|