@@ -497,9 +497,9 @@ class Gd extends \Phalcon\Image\Adapter implements \Phalcon\Image\AdapterInterfa
497
497
{
498
498
var ext;
499
499
500
- let ext = strtolower( pathinfo(file, PATHINFO_EXTENSION ) );
500
+ let ext = pathinfo(file, PATHINFO_EXTENSION );
501
501
502
- if strcmp (ext, " gif" ) == 0 {
502
+ if strcasecmp (ext, " gif" ) == 0 {
503
503
let this -> _type = 1 ;
504
504
let this -> _mime = image_type_to_mime_type(this -> _type);
505
505
imagegif(this -> _image, file);
@@ -514,7 +514,7 @@ class Gd extends \Phalcon\Image\Adapter implements \Phalcon\Image\AdapterInterfa
514
514
if strcmp(ext, " png" ) == 0 {
515
515
let this -> _type = 3 ;
516
516
let this -> _mime = image_type_to_mime_type(this -> _type);
517
- imagepng (this -> _image, file);
517
+ imagejpeg (this -> _image, file);
518
518
return true ;
519
519
}
520
520
if strcmp(ext, " wbmp" ) == 0 {
@@ -535,9 +535,8 @@ class Gd extends \Phalcon\Image\Adapter implements \Phalcon\Image\AdapterInterfa
535
535
536
536
protected function _render (string ext, int quality )
537
537
{
538
- let ext = strtolower(ext);
539
538
ob_start();
540
- if strcmp (ext, " gif" ) == 0 {
539
+ if strcasecmp (ext, " gif" ) == 0 {
541
540
imagegif(this -> _image);
542
541
return ob_get_clean();
543
542
}
@@ -546,7 +545,7 @@ class Gd extends \Phalcon\Image\Adapter implements \Phalcon\Image\AdapterInterfa
546
545
return ob_get_clean();
547
546
}
548
547
if strcmp(ext, " png" ) == 0 {
549
- imagepng (this -> _image);
548
+ imagejpeg (this -> _image);
550
549
return ob_get_clean();
551
550
}
552
551
if strcmp(ext, " wbmp" ) == 0 {
0 commit comments