Ignore:
Timestamp:
Dec 1, 2010 2:44:30 PM (2 years ago)
Author:
thomasb
Message:

Code/CSS style

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/devel-addressbook/program/steps/addressbook/show.inc

    r4298 r4300  
    3636    // check some magic numbers to detect image type 
    3737    $type = 'jpeg'; 
    38     if (preg_match('/^\x89\x50\x4E\x47/', $data)) 
    39         $type = 'png'; 
    40     else if (preg_match('/^\x47\x49\x46\x38/', $data)) 
    41         $type = 'png'; 
    42     //else if (preg_match('/^\xFF\xD8\xFF\xE0/', $data)) 
    43     //    $type = 'jpeg'; 
     38    if (preg_match('/^\x89\x50\x4E\x47/', $data))      $type = 'png'; 
     39    else if (preg_match('/^\x47\x49\x46\x38/', $data)) $type = 'gif'; 
     40//  else if (preg_match('/^\xFF\xD8\xFF\xE0/', $data)) $type = 'jpeg'; 
    4441     
    4542    header('Content-Type: image/' . $type); 
Note: See TracChangeset for help on using the changeset viewer.