瀏覽代碼

automatic image resize

tags/0.1.0
Robin Thoni 9 年之前
父節點
當前提交
fae28bc356
共有 1 個檔案被更改,包括 2 行新增0 行删除
  1. 2
    0
      app/Http/Business/Cameras/AbstractCamera.php

+ 2
- 0
app/Http/Business/Cameras/AbstractCamera.php 查看文件

@@ -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…
取消
儲存