diff options
author | z0rglub <z0rglub@piwigo.org> | 2003-07-21 19:47:14 +0000 |
---|---|---|
committer | z0rglub <z0rglub@piwigo.org> | 2003-07-21 19:47:14 +0000 |
commit | 2fa9252446a78d349ca2f50096430591cc5e012f (patch) | |
tree | bbf5cd282c8b9424b05d970c70e30610ea8b0e4f /admin/include | |
parent | 55a0a61aaf58a02e2ac5d2c489f81b1be4730cd8 (diff) |
*** empty log message ***
git-svn-id: http://piwigo.org/svn/trunk@26 68402e56-0260-453c-a942-63ccdbb3a9ee
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 |