I am not able to upload .bmp images properly into my blogs.If it is a very large image then the entire page layout is getting changed.
I checked in my physical folder and found out that thumbnails are not getting created for .bmp images.Why is it so?
for any image "imagename.serendipityThumb.extension" is getting created once we upload images through Add Media.But for .bmp images they are not getting created. I saw in functions_images.inc.php file and found the following code:
Code: Select all
function serendipity_functions_gd($infilename) {
if (!function_exists('imagecopyresampled')) {
return false;
}
$func = array();
$inf = pathinfo(strtolower($infilename));
switch ($inf['extension']) {
case 'gif':
$func['load'] = 'imagecreatefromgif';
$func['save'] = 'imagegif';
break;
case 'jpeg':
case 'jpg':
case 'jfif':
$func['load'] = 'imagecreatefromjpeg';
$func['save'] = 'imagejpeg';
break;
case 'png':
$func['load'] = 'imagecreatefrompng';
$func['save'] = 'imagepng';
break;
Code: Select all
function serendipity_guessMime($extension) {
$mime = '';
switch (strtolower($extension)) {
case 'jpg':
case 'jpeg':
$mime = 'image/jpeg';
break;
case 'aiff':
case 'aif':
$mime = 'audio/x-aiff';
break;
case 'gif':
$mime = 'image/gif';
break;
case 'bmp':
$mime='image/bmp';
break;
case 'png':
$mime = 'image/png';
break;
case 'pdf':
$mime = 'application/pdf';
break;
.......
do i have to add anything here for thumbnails to be created for .bmp images?
Can anyone please help me in solving my problem?
Thanking you in advance