@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | - /** |
|
2 | + /** |
|
3 | 3 | ##DOC-SIGNATURE## |
4 | 4 | |
5 | 5 | This file is part of WideImage. |
@@ -17,9 +17,8 @@ discard block |
||
17 | 17 | You should have received a copy of the GNU Lesser General Public License |
18 | 18 | along with WideImage; if not, write to the Free Software |
19 | 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
20 | - |
|
21 | - * @package Internal/Mappers |
|
22 | - **/ |
|
20 | + * @package Internal/Mappers |
|
21 | + **/ |
|
23 | 22 | |
24 | 23 | namespace WideImage\Mapper; |
25 | 24 | |
@@ -30,23 +29,23 @@ discard block |
||
30 | 29 | */ |
31 | 30 | class GIF |
32 | 31 | { |
33 | - public function load($uri) |
|
34 | - { |
|
35 | - return @imagecreatefromgif($uri); |
|
36 | - } |
|
32 | + public function load($uri) |
|
33 | + { |
|
34 | + return @imagecreatefromgif($uri); |
|
35 | + } |
|
37 | 36 | |
38 | - public function save($handle, $uri = null) |
|
39 | - { |
|
40 | - // This is a workaround for a bug, for which PHP devs claim it's not |
|
41 | - // really a bug. Well, it IS. |
|
42 | - // You can't pass null as the second parameter, because php is |
|
43 | - // then trying to save an image to a '' location (which results in an |
|
44 | - // error, of course). And the same thing works fine for imagepng() and |
|
45 | - // imagejpeg(). It's a bug! ;) |
|
46 | - if ($uri) { |
|
47 | - return imagegif($handle, $uri); |
|
48 | - } |
|
37 | + public function save($handle, $uri = null) |
|
38 | + { |
|
39 | + // This is a workaround for a bug, for which PHP devs claim it's not |
|
40 | + // really a bug. Well, it IS. |
|
41 | + // You can't pass null as the second parameter, because php is |
|
42 | + // then trying to save an image to a '' location (which results in an |
|
43 | + // error, of course). And the same thing works fine for imagepng() and |
|
44 | + // imagejpeg(). It's a bug! ;) |
|
45 | + if ($uri) { |
|
46 | + return imagegif($handle, $uri); |
|
47 | + } |
|
49 | 48 | |
50 | - return imagegif($handle); |
|
51 | - } |
|
49 | + return imagegif($handle); |
|
50 | + } |
|
52 | 51 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | - /** |
|
2 | + /** |
|
3 | 3 | ##DOC-SIGNATURE## |
4 | 4 | |
5 | 5 | This file is part of WideImage. |
@@ -17,9 +17,8 @@ discard block |
||
17 | 17 | You should have received a copy of the GNU Lesser General Public License |
18 | 18 | along with WideImage; if not, write to the Free Software |
19 | 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
20 | - |
|
21 | - * @package Internal/Mappers |
|
22 | - **/ |
|
20 | + * @package Internal/Mappers |
|
21 | + **/ |
|
23 | 22 | |
24 | 23 | namespace WideImage\Mapper; |
25 | 24 | |
@@ -30,13 +29,13 @@ discard block |
||
30 | 29 | */ |
31 | 30 | class PNG |
32 | 31 | { |
33 | - public function load($uri) |
|
34 | - { |
|
35 | - return @imagecreatefrompng($uri); |
|
36 | - } |
|
32 | + public function load($uri) |
|
33 | + { |
|
34 | + return @imagecreatefrompng($uri); |
|
35 | + } |
|
37 | 36 | |
38 | - public function save($handle, $uri = null, $compression = 9, $filters = PNG_ALL_FILTERS) |
|
39 | - { |
|
40 | - return imagepng($handle, $uri, $compression, $filters); |
|
41 | - } |
|
37 | + public function save($handle, $uri = null, $compression = 9, $filters = PNG_ALL_FILTERS) |
|
38 | + { |
|
39 | + return imagepng($handle, $uri, $compression, $filters); |
|
40 | + } |
|
42 | 41 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | - /** |
|
2 | + /** |
|
3 | 3 | ##DOC-SIGNATURE## |
4 | 4 | |
5 | 5 | This file is part of WideImage. |
@@ -17,9 +17,8 @@ discard block |
||
17 | 17 | You should have received a copy of the GNU Lesser General Public License |
18 | 18 | along with WideImage; if not, write to the Free Software |
19 | 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
20 | - |
|
21 | - * @package Internal/Mappers |
|
22 | - **/ |
|
20 | + * @package Internal/Mappers |
|
21 | + **/ |
|
23 | 22 | |
24 | 23 | namespace WideImage\Mapper; |
25 | 24 | |
@@ -30,17 +29,17 @@ discard block |
||
30 | 29 | */ |
31 | 30 | class GD |
32 | 31 | { |
33 | - public function load($uri) |
|
34 | - { |
|
35 | - return @imagecreatefromgd($uri); |
|
36 | - } |
|
32 | + public function load($uri) |
|
33 | + { |
|
34 | + return @imagecreatefromgd($uri); |
|
35 | + } |
|
37 | 36 | |
38 | - public function save($handle, $uri = null) |
|
39 | - { |
|
40 | - if ($uri == null) { |
|
41 | - return imagegd($handle); |
|
42 | - } |
|
37 | + public function save($handle, $uri = null) |
|
38 | + { |
|
39 | + if ($uri == null) { |
|
40 | + return imagegd($handle); |
|
41 | + } |
|
43 | 42 | |
44 | - return imagegd($handle, $uri); |
|
45 | - } |
|
43 | + return imagegd($handle, $uri); |
|
44 | + } |
|
46 | 45 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | - /** |
|
2 | + /** |
|
3 | 3 | ##DOC-SIGNATURE## |
4 | 4 | |
5 | 5 | This file is part of WideImage. |
@@ -17,9 +17,8 @@ discard block |
||
17 | 17 | You should have received a copy of the GNU Lesser General Public License |
18 | 18 | along with WideImage; if not, write to the Free Software |
19 | 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
20 | - |
|
21 | - * @package Internal/Mappers |
|
22 | - **/ |
|
20 | + * @package Internal/Mappers |
|
21 | + **/ |
|
23 | 22 | |
24 | 23 | namespace WideImage\Mapper; |
25 | 24 | |
@@ -30,13 +29,13 @@ discard block |
||
30 | 29 | */ |
31 | 30 | class GD2 |
32 | 31 | { |
33 | - public function load($uri) |
|
34 | - { |
|
35 | - return @imagecreatefromgd2($uri); |
|
36 | - } |
|
32 | + public function load($uri) |
|
33 | + { |
|
34 | + return @imagecreatefromgd2($uri); |
|
35 | + } |
|
37 | 36 | |
38 | - public function save($handle, $uri = null, $chunk_size = null, $type = null) |
|
39 | - { |
|
40 | - return imagegd2($handle, $uri, $chunk_size, $type); |
|
41 | - } |
|
37 | + public function save($handle, $uri = null, $chunk_size = null, $type = null) |
|
38 | + { |
|
39 | + return imagegd2($handle, $uri, $chunk_size, $type); |
|
40 | + } |
|
42 | 41 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | - /** |
|
2 | + /** |
|
3 | 3 | ##DOC-SIGNATURE## |
4 | 4 | |
5 | 5 | This file is part of WideImage. |
@@ -17,9 +17,8 @@ discard block |
||
17 | 17 | You should have received a copy of the GNU Lesser General Public License |
18 | 18 | along with WideImage; if not, write to the Free Software |
19 | 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
20 | - |
|
21 | - * @package Internal/Mappers |
|
22 | - **/ |
|
20 | + * @package Internal/Mappers |
|
21 | + **/ |
|
23 | 22 | |
24 | 23 | namespace WideImage\Mapper; |
25 | 24 | |
@@ -32,22 +31,22 @@ discard block |
||
32 | 31 | */ |
33 | 32 | class BMP |
34 | 33 | { |
35 | - public function load($uri) |
|
36 | - { |
|
37 | - return de77\BMP::imagecreatefrombmp($uri); |
|
38 | - } |
|
34 | + public function load($uri) |
|
35 | + { |
|
36 | + return de77\BMP::imagecreatefrombmp($uri); |
|
37 | + } |
|
39 | 38 | |
40 | - public function loadFromString($data) |
|
41 | - { |
|
42 | - return de77\BMP::imagecreatefromstring($data); |
|
43 | - } |
|
39 | + public function loadFromString($data) |
|
40 | + { |
|
41 | + return de77\BMP::imagecreatefromstring($data); |
|
42 | + } |
|
44 | 43 | |
45 | - public function save($handle, $uri = null) |
|
46 | - { |
|
47 | - if ($uri == null) { |
|
48 | - return de77\BMP::imagebmp($handle); |
|
49 | - } |
|
44 | + public function save($handle, $uri = null) |
|
45 | + { |
|
46 | + if ($uri == null) { |
|
47 | + return de77\BMP::imagebmp($handle); |
|
48 | + } |
|
50 | 49 | |
51 | - return de77\BMP::imagebmp($handle, $uri); |
|
52 | - } |
|
50 | + return de77\BMP::imagebmp($handle, $uri); |
|
51 | + } |
|
53 | 52 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | - /** |
|
2 | + /** |
|
3 | 3 | ##DOC-SIGNATURE## |
4 | 4 | |
5 | 5 | This file is part of WideImage. |
@@ -17,9 +17,8 @@ discard block |
||
17 | 17 | You should have received a copy of the GNU Lesser General Public License |
18 | 18 | along with WideImage; if not, write to the Free Software |
19 | 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
20 | - |
|
21 | - * @package Internal/Mappers |
|
22 | - **/ |
|
20 | + * @package Internal/Mappers |
|
21 | + **/ |
|
23 | 22 | |
24 | 23 | namespace WideImage\Mapper; |
25 | 24 | |
@@ -30,13 +29,13 @@ discard block |
||
30 | 29 | */ |
31 | 30 | class JPEG |
32 | 31 | { |
33 | - public function load($uri) |
|
34 | - { |
|
35 | - return @imagecreatefromjpeg($uri); |
|
36 | - } |
|
32 | + public function load($uri) |
|
33 | + { |
|
34 | + return @imagecreatefromjpeg($uri); |
|
35 | + } |
|
37 | 36 | |
38 | - public function save($handle, $uri = null, $quality = 100) |
|
39 | - { |
|
40 | - return imagejpeg($handle, $uri, $quality); |
|
41 | - } |
|
37 | + public function save($handle, $uri = null, $quality = 100) |
|
38 | + { |
|
39 | + return imagejpeg($handle, $uri, $quality); |
|
40 | + } |
|
42 | 41 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | - /** |
|
2 | + /** |
|
3 | 3 | ##DOC-SIGNATURE## |
4 | 4 | |
5 | 5 | This file is part of WideImage. |
@@ -17,9 +17,8 @@ discard block |
||
17 | 17 | You should have received a copy of the GNU Lesser General Public License |
18 | 18 | along with WideImage; if not, write to the Free Software |
19 | 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
20 | - |
|
21 | - * @package Internal/Mappers |
|
22 | - **/ |
|
20 | + * @package Internal/Mappers |
|
21 | + **/ |
|
23 | 22 | |
24 | 23 | namespace WideImage\Mapper; |
25 | 24 | |
@@ -33,18 +32,18 @@ discard block |
||
33 | 32 | */ |
34 | 33 | class TGA |
35 | 34 | { |
36 | - public function load($uri) |
|
37 | - { |
|
38 | - return de77\TGA::imagecreatefromtga($uri); |
|
39 | - } |
|
35 | + public function load($uri) |
|
36 | + { |
|
37 | + return de77\TGA::imagecreatefromtga($uri); |
|
38 | + } |
|
40 | 39 | |
41 | - public function loadFromString($data) |
|
42 | - { |
|
43 | - return de77\TGA::imagecreatefromstring($data); |
|
44 | - } |
|
40 | + public function loadFromString($data) |
|
41 | + { |
|
42 | + return de77\TGA::imagecreatefromstring($data); |
|
43 | + } |
|
45 | 44 | |
46 | - public function save($handle, $uri = null) |
|
47 | - { |
|
48 | - throw new Exception("Saving to TGA isn't supported."); |
|
49 | - } |
|
45 | + public function save($handle, $uri = null) |
|
46 | + { |
|
47 | + throw new Exception("Saving to TGA isn't supported."); |
|
48 | + } |
|
50 | 49 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | - /** |
|
2 | + /** |
|
3 | 3 | ##DOC-SIGNATURE## |
4 | 4 | |
5 | 5 | This file is part of WideImage. |
@@ -17,10 +17,9 @@ discard block |
||
17 | 17 | You should have received a copy of the GNU Lesser General Public License |
18 | 18 | along with WideImage; if not, write to the Free Software |
19 | 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
20 | - |
|
21 | - * @package Internal/Mappers |
|
22 | - * @author Krzysztof Bednarczyk |
|
23 | - **/ |
|
20 | + * @package Internal/Mappers |
|
21 | + * @author Krzysztof Bednarczyk |
|
22 | + **/ |
|
24 | 23 | |
25 | 24 | namespace WideImage\Mapper; |
26 | 25 | |
@@ -31,13 +30,13 @@ discard block |
||
31 | 30 | */ |
32 | 31 | class WEBP |
33 | 32 | { |
34 | - public function load($uri) |
|
35 | - { |
|
36 | - return @imagecreatefromwebp($uri); |
|
37 | - } |
|
33 | + public function load($uri) |
|
34 | + { |
|
35 | + return @imagecreatefromwebp($uri); |
|
36 | + } |
|
38 | 37 | |
39 | - public function save($handle, $uri = null) |
|
40 | - { |
|
41 | - return imagewebp($handle, $uri); |
|
42 | - } |
|
38 | + public function save($handle, $uri = null) |
|
39 | + { |
|
40 | + return imagewebp($handle, $uri); |
|
41 | + } |
|
43 | 42 | } |
@@ -2,6 +2,6 @@ |
||
2 | 2 | |
3 | 3 | // autoload.php @generated by Composer |
4 | 4 | |
5 | -require_once __DIR__ . '/composer/autoload_real.php'; |
|
5 | +require_once __DIR__.'/composer/autoload_real.php'; |
|
6 | 6 | |
7 | 7 | return ComposerAutoloaderInitfb0e5c3e4af98ed910184391855ba473::getLoader(); |