|
@@ 1490-1510 (lines=21) @@
|
| 1487 |
|
|
| 1488 |
|
// if JPEG |
| 1489 |
|
case 'jpg': |
| 1490 |
|
case 'jpeg': |
| 1491 |
|
|
| 1492 |
|
// if GD support for this file type is not available |
| 1493 |
|
if (!function_exists('imagejpeg')) { |
| 1494 |
|
|
| 1495 |
|
// save the error level and stop the execution of the script |
| 1496 |
|
$this->error = 6; |
| 1497 |
|
|
| 1498 |
|
return false; |
| 1499 |
|
|
| 1500 |
|
// if, for some reason, file could not be created |
| 1501 |
|
} elseif (@!imagejpeg($identifier, $this->target_path, $this->jpeg_quality)) { |
| 1502 |
|
|
| 1503 |
|
// save the error level and stop the execution of the script |
| 1504 |
|
$this->error = 3; |
| 1505 |
|
|
| 1506 |
|
return false; |
| 1507 |
|
} |
| 1508 |
|
|
| 1509 |
|
break; |
| 1510 |
|
|
| 1511 |
|
// if PNG |
| 1512 |
|
case 'png': |
| 1513 |
|
|
|
@@ 1512-1535 (lines=24) @@
|
| 1509 |
|
break; |
| 1510 |
|
|
| 1511 |
|
// if PNG |
| 1512 |
|
case 'png': |
| 1513 |
|
|
| 1514 |
|
// save full alpha channel information |
| 1515 |
|
imagesavealpha($identifier, true); |
| 1516 |
|
|
| 1517 |
|
// if GD support for this file type is not available |
| 1518 |
|
if (!function_exists('imagepng')) { |
| 1519 |
|
|
| 1520 |
|
// save the error level and stop the execution of the script |
| 1521 |
|
$this->error = 6; |
| 1522 |
|
|
| 1523 |
|
return false; |
| 1524 |
|
|
| 1525 |
|
// if, for some reason, file could not be created |
| 1526 |
|
} elseif (@!imagepng($identifier, $this->target_path, $this->png_compression)) { |
| 1527 |
|
|
| 1528 |
|
// save the error level and stop the execution of the script |
| 1529 |
|
$this->error = 3; |
| 1530 |
|
|
| 1531 |
|
return false; |
| 1532 |
|
} |
| 1533 |
|
|
| 1534 |
|
break; |
| 1535 |
|
|
| 1536 |
|
// if not a supported file extension |
| 1537 |
|
default: |
| 1538 |
|
|