|
@@ 656-675 (lines=20) @@
|
| 653 |
|
@$ImageOutFunction($this->gdimg_output); |
| 654 |
|
break; |
| 655 |
|
|
| 656 |
|
case 'bmp': |
| 657 |
|
if (!@include_once(dirname(__FILE__).'/phpthumb.bmp.php')) { |
| 658 |
|
$this->DebugMessage('Error including "'.dirname(__FILE__).'/phpthumb.bmp.php" which is required for BMP format output', __FILE__, __LINE__); |
| 659 |
|
return false; |
| 660 |
|
} |
| 661 |
|
$phpthumb_bmp = new phpthumb_bmp(); |
| 662 |
|
if (is_object($phpthumb_bmp)) { |
| 663 |
|
$bmp_data = $phpthumb_bmp->GD2BMPstring($this->gdimg_output); |
| 664 |
|
unset($phpthumb_bmp); |
| 665 |
|
if (!$bmp_data) { |
| 666 |
|
$this->DebugMessage('$phpthumb_bmp->GD2BMPstring() failed', __FILE__, __LINE__); |
| 667 |
|
return false; |
| 668 |
|
} |
| 669 |
|
header('Content-Type: '.phpthumb_functions::ImageTypeToMIMEtype($this->thumbnailFormat)); |
| 670 |
|
echo $bmp_data; |
| 671 |
|
} else { |
| 672 |
|
$this->DebugMessage('new phpthumb_bmp() failed', __FILE__, __LINE__); |
| 673 |
|
return false; |
| 674 |
|
} |
| 675 |
|
break; |
| 676 |
|
|
| 677 |
|
case 'ico': |
| 678 |
|
if (!@include_once(dirname(__FILE__).'/phpthumb.ico.php')) { |
|
@@ 677-697 (lines=21) @@
|
| 674 |
|
} |
| 675 |
|
break; |
| 676 |
|
|
| 677 |
|
case 'ico': |
| 678 |
|
if (!@include_once(dirname(__FILE__).'/phpthumb.ico.php')) { |
| 679 |
|
$this->DebugMessage('Error including "'.dirname(__FILE__).'/phpthumb.ico.php" which is required for ICO format output', __FILE__, __LINE__); |
| 680 |
|
return false; |
| 681 |
|
} |
| 682 |
|
$phpthumb_ico = new phpthumb_ico(); |
| 683 |
|
if (is_object($phpthumb_ico)) { |
| 684 |
|
$arrayOfOutputImages = array($this->gdimg_output); |
| 685 |
|
$ico_data = $phpthumb_ico->GD2ICOstring($arrayOfOutputImages); |
| 686 |
|
unset($phpthumb_ico); |
| 687 |
|
if (!$ico_data) { |
| 688 |
|
$this->DebugMessage('$phpthumb_ico->GD2ICOstring() failed', __FILE__, __LINE__); |
| 689 |
|
return false; |
| 690 |
|
} |
| 691 |
|
header('Content-Type: '.phpthumb_functions::ImageTypeToMIMEtype($this->thumbnailFormat)); |
| 692 |
|
echo $ico_data; |
| 693 |
|
} else { |
| 694 |
|
$this->DebugMessage('new phpthumb_ico() failed', __FILE__, __LINE__); |
| 695 |
|
return false; |
| 696 |
|
} |
| 697 |
|
break; |
| 698 |
|
|
| 699 |
|
default: |
| 700 |
|
$this->DebugMessage('OutputThumbnail failed because $this->thumbnailFormat "'.$this->thumbnailFormat.'" is not valid', __FILE__, __LINE__); |