Browse Source

automatic image resize

tags/0.1.0
Robin Thoni 9 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
 
10
 
11
 use App\Http\DBO\CamerasDbo;
11
 use App\Http\DBO\CamerasDbo;
12
 use App\Http\DBO\CamerasImageDbo;
12
 use App\Http\DBO\CamerasImageDbo;
13
+use Imagine\Image\Box;
13
 use Imagine\Imagick\Image;
14
 use Imagine\Imagick\Image;
14
 use Imagine\Imagick\Imagine;
15
 use Imagine\Imagick\Imagine;
15
 
16
 
41
     {
42
     {
42
         $this->prepareImage();
43
         $this->prepareImage();
43
         $imageDbo = new CamerasImageDbo();
44
         $imageDbo = new CamerasImageDbo();
45
+        $this->_image->resize(new Box(640, 360));
44
         $imageDbo->setImage(base64_encode($this->_image->get("jpeg")));
46
         $imageDbo->setImage(base64_encode($this->_image->get("jpeg")));
45
         return $imageDbo;
47
         return $imageDbo;
46
     }
48
     }

Loading…
Cancel
Save