1: <?php
2:
3: namespace webfilesframework\core\datasystem\file\format\media\image\handler;
4:
5:
6: /**
7: * description
8: *
9: * @author Sebastian Monzel < mail@sebastianmonzel.de >
10: * @since 0.1.7
11: */
12: class MGdHandler extends MAbstractImageLibraryHandler
13: {
14:
15: /**
16: * (non-PHPdoc)
17: * @see MAbstractImageLibraryHandler::loadJpg()
18: * @param $p_sImage
19: * @return resource
20: */
21: public function loadJpg($p_sImage)
22: {
23: // workaround for: "Invalid SOS parameters for sequential JPEG" - actually ignoring it
24: ini_set ('gd.jpeg_ignore_warning', 1);
25: return @imagecreatefromjpeg($p_sImage);
26: }
27:
28: /**
29: * (non-PHPdoc)
30: * @see MAbstractImageLibraryHandler::loadPng()
31: * @param $p_sImage
32: * @return resource
33: */
34: public function loadPng($p_sImage)
35: {
36: return imagecreatefrompng($p_sImage);
37: }
38:
39: }