// If images aren't support by gd (not gif, jpg, jpeg, png)
if ($imagetype == 'bmp') {
// use getimagesize instead api_getimagesize($image); becasuse api_getimagesize doesn't support bmp files. Put here for each show, only for a few bmp files isn't heavy
// use getimagesize instead api_getimagesize($image);
// because api_getimagesize doesn't support bmp files.
// Put here for each show, only for a few bmp files isn't heavy
$original_image_size = getimagesize($image);
if ($max_thumbnail_width < $original_image_size[0] || $max_thumbnail_height < $original_image_size[1]) {
$thumbnail_size = api_calculate_image_size($original_image_size[0], $original_image_size[1], $max_thumbnail_width, $max_thumbnail_height); //don't use resize_image because doesn't run with bmp files
if ($max_thumbnail_width < $original_image_size[0] ||
$max_thumbnail_height < $original_image_size[1]
) {
//don't use resize_image because doesn't run with bmp files