diff options
Diffstat (limited to 'admin/include')
-rw-r--r-- | admin/include/functions.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php index cd58d0822..6a5ed195e 100644 --- a/admin/include/functions.php +++ b/admin/include/functions.php @@ -17,11 +17,16 @@ $tab_ext_create_TN = array ( 'jpg', 'png', 'JPG', 'PNG' ); +// is_image returns true if the given $filename (including the path) is a +// picture according to its format and its extension. +// As GD library can only generate pictures from jpeg and png files, if you +// ask if the filename is an image for thumbnail creation (second parameter +// set to true), the only authorized formats are jpeg and png. function is_image( $filename, $create_thumbnail = false ) { global $conf, $tab_ext_create_TN; - if ( is_file ( $filename ) ) + if ( is_file( $filename ) ) { $size = getimagesize( $filename ); // $size[2] == 1 means GIF |