@@ 1485-1497 (lines=13) @@ | ||
1482 | { |
|
1483 | switch ($this->image_type) |
|
1484 | { |
|
1485 | case 1: |
|
1486 | if ( ! function_exists('imagegif')) |
|
1487 | { |
|
1488 | $this->set_error(array('imglib_unsupported_imagecreate', 'imglib_gif_not_supported')); |
|
1489 | return FALSE; |
|
1490 | } |
|
1491 | ||
1492 | if ( ! @imagegif($resource, $this->full_dst_path)) |
|
1493 | { |
|
1494 | $this->set_error('imglib_save_failed'); |
|
1495 | return FALSE; |
|
1496 | } |
|
1497 | break; |
|
1498 | case 2: |
|
1499 | if ( ! function_exists('imagejpeg')) |
|
1500 | { |
|
@@ 1498-1510 (lines=13) @@ | ||
1495 | return FALSE; |
|
1496 | } |
|
1497 | break; |
|
1498 | case 2: |
|
1499 | if ( ! function_exists('imagejpeg')) |
|
1500 | { |
|
1501 | $this->set_error(array('imglib_unsupported_imagecreate', 'imglib_jpg_not_supported')); |
|
1502 | return FALSE; |
|
1503 | } |
|
1504 | ||
1505 | if ( ! @imagejpeg($resource, $this->full_dst_path, $this->quality)) |
|
1506 | { |
|
1507 | $this->set_error('imglib_save_failed'); |
|
1508 | return FALSE; |
|
1509 | } |
|
1510 | break; |
|
1511 | case 3: |
|
1512 | if ( ! function_exists('imagepng')) |
|
1513 | { |
|
@@ 1511-1523 (lines=13) @@ | ||
1508 | return FALSE; |
|
1509 | } |
|
1510 | break; |
|
1511 | case 3: |
|
1512 | if ( ! function_exists('imagepng')) |
|
1513 | { |
|
1514 | $this->set_error(array('imglib_unsupported_imagecreate', 'imglib_png_not_supported')); |
|
1515 | return FALSE; |
|
1516 | } |
|
1517 | ||
1518 | if ( ! @imagepng($resource, $this->full_dst_path)) |
|
1519 | { |
|
1520 | $this->set_error('imglib_save_failed'); |
|
1521 | return FALSE; |
|
1522 | } |
|
1523 | break; |
|
1524 | default: |
|
1525 | $this->set_error(array('imglib_unsupported_imagecreate')); |
|
1526 | return FALSE; |