update page now

Voting

: zero minus zero?
(Example: nine)

The Note You're Voting On

tomasz at trejderowski dot pl
12 years ago
If you want to "convert" value returned by "getimagesize()" as index "2" into something more human-readable, you may consider using a function like this one:

    $imageTypeArray = array
    (
        0=>'UNKNOWN',
        1=>'GIF',
        2=>'JPEG',
        3=>'PNG',
        4=>'SWF',
        5=>'PSD',
        6=>'BMP',
        7=>'TIFF_II',
        8=>'TIFF_MM',
        9=>'JPC',
        10=>'JP2',
        11=>'JPX',
        12=>'JB2',
        13=>'SWC',
        14=>'IFF',
        15=>'WBMP',
        16=>'XBM',
        17=>'ICO',
        18=>'COUNT'  
    );
    
    $size = getimagesize($filename);
    
    $size[2] = $imageTypeArray[$size[2]];

Or something similar.

<< Back to user notes page

To Top