Browse Source

automatic image resize

tags/0.1.0
Robin Thoni 8 years ago
parent
commit
fae28bc356
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      app/Http/Business/Cameras/AbstractCamera.php

+ 2
- 0
app/Http/Business/Cameras/AbstractCamera.php View File

@@ -10,6 +10,7 @@ namespace app\Http\Business\Cameras;
10 10
 
11 11
 use App\Http\DBO\CamerasDbo;
12 12
 use App\Http\DBO\CamerasImageDbo;
13
+use Imagine\Image\Box;
13 14
 use Imagine\Imagick\Image;
14 15
 use Imagine\Imagick\Imagine;
15 16
 
@@ -41,6 +42,7 @@ abstract class AbstractCamera
41 42
     {
42 43
         $this->prepareImage();
43 44
         $imageDbo = new CamerasImageDbo();
45
+        $this->_image->resize(new Box(640, 360));
44 46
         $imageDbo->setImage(base64_encode($this->_image->get("jpeg")));
45 47
         return $imageDbo;
46 48
     }

Loading…
Cancel
Save