student101
03-13-2010, 09:18 AM
bitmap resize: which one is correct?
switch ($oFile['type']){
// which case below is correct?
case 'image/bmp':
case 'image/imagewbmp':
case 'image/vnd.wap.wbmp':
// which case above is correct?
$oldImage = imagecreatefromwbmp($oFile['tmp_name']);
imagecopyresampled($newImage, $oldImage, 0, 0, 0, 0, $newWidth, $newHeight, $oldWidth, $oldHeight);
imagewbmp($newImage, $sFilePath);
break;
switch ($oFile['type']){
// which case below is correct?
case 'image/bmp':
case 'image/imagewbmp':
case 'image/vnd.wap.wbmp':
// which case above is correct?
$oldImage = imagecreatefromwbmp($oFile['tmp_name']);
imagecopyresampled($newImage, $oldImage, 0, 0, 0, 0, $newWidth, $newHeight, $oldWidth, $oldHeight);
imagewbmp($newImage, $sFilePath);
break;