_imagine = new Imagine(); $this->_image = $this->_imagine->open("../resources/images/dummy_camera.jpg"); } /** * @return CamerasImageDbo */ public function getImage() { $imageDbo = new CamerasImageDbo(); $draw = $this->_image->draw(); $palette = new RGB(); $radius = rand(10, 42); $draw->ellipse(new Point(42, 42), new Box($radius, $radius), $palette->color('#ff0000')); $imageDbo->setImage(base64_encode($this->_image->get("jpeg"))); return $imageDbo; } }