mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Added support for bmp images (#931)
This commit is contained in:
parent
cfed26400e
commit
cb4516f869
1 changed files with 8 additions and 0 deletions
|
@ -77,6 +77,8 @@ function get_supported_image_types($type)
|
|||
$new_type = ($format & IMG_PNG) ? IMG_PNG : 0;
|
||||
break;
|
||||
case IMAGETYPE_BMP:
|
||||
$new_type = ($format & IMG_BMP) ? IMG_BMP : 0;
|
||||
break;
|
||||
case IMAGETYPE_WBMP:
|
||||
$new_type = ($format & IMG_WBMP) ? IMG_WBMP : 0;
|
||||
break;
|
||||
|
@ -140,6 +142,9 @@ function create_thumbnail($source, $new_file, $mimetype)
|
|||
case IMG_PNG:
|
||||
$image = imagecreatefrompng($source);
|
||||
break;
|
||||
case IMG_BMP:
|
||||
$image = imagecreatefrombmp($source);
|
||||
break;
|
||||
case IMG_WBMP:
|
||||
$image = imagecreatefromwbmp($source);
|
||||
break;
|
||||
|
@ -168,6 +173,9 @@ function create_thumbnail($source, $new_file, $mimetype)
|
|||
case IMG_PNG:
|
||||
imagepng($new_image, $new_file);
|
||||
break;
|
||||
case IMG_BMP:
|
||||
imagebmp($new_image, $new_file);
|
||||
break;
|
||||
case IMG_WBMP:
|
||||
imagewbmp($new_image, $new_file);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue