Ejemplo n.º 1
0
 /**
  * Saves an image
  * 
  * @param string $destination
  * @param string $format
  */
 public function save($destination, $format = null)
 {
     $tmp = './' . $this->getUniqId() . '.' . $this->getFormat();
     parent::save($tmp, $format);
     $this->getStreamWrapper()->putContents($destination, file_get_contents($tmp));
     unlink($tmp);
     return $this;
 }
Ejemplo n.º 2
0
 public function testSave()
 {
     $imageCreator = new GdThumb();
     $imageCreator->setStreamWrapper(new File());
     $imageCreator->setSource($this->path . 'hlegius.jpg');
     $imageCreator->save(DEEPZOOM_TESTSUITE_DESTINATION_PATH . 'hlegius.save.jpg');
     $this->assertFileExists(DEEPZOOM_TESTSUITE_DESTINATION_PATH . 'hlegius.save.jpg');
 }