示例#1
0
 /**
  * (non-PHPdoc)
  *
  * @param Query $query
  *            The query to add the action to
  * @return Query
  * @see Action::perform()
  */
 public function perform(Query $query)
 {
     if ($this->profilePath != '') {
         $query->setOutputOption(' ' . ($this->remove ? '+' : '-') . 'profile "' . $this->profilePath . '" ');
     } else {
         $query->setOutputOption(' ' . ($this->remove ? '+' : '-') . 'profile ' . $this->profileName);
     }
     return $query;
 }
示例#2
0
 /**
  * (non-PHPdoc)
  *
  * @param Query $query
  *            The query to add the action to
  * @return Query
  * @see Action::perform()
  */
 public function perform(Query $query)
 {
     $query->notWith('background', Query::ARGUMENT_TYPE_INPUT);
     if (Color::validColorName($this->color)) {
         $query->setInputOption(' -background ' . $this->color);
     } else {
         $query->setInputOption(' -background "' . $this->color . '"');
     }
     return $query;
 }
示例#3
0
 /**
  * (non-PHPdoc)
  *
  * @param Query $query
  *            The query to add the action to
  * @return Query
  * @see Action::perform()
  */
 public function perform(Query $query)
 {
     $query->notWith('resample', Query::ARGUMENT_TYPE_INPUT);
     $query->notWith('resize', Query::ARGUMENT_TYPE_INPUT);
     $option = " -resample '";
     if ($this->newWidth != "" && $this->newHeight != "") {
         $option = $option . $this->newWidth . "x" . $this->newHeight;
     } elseif ($this->newWidth != "") {
         $option = $option . $this->newWidth;
     }
     $option = $option . "' ";
     $query->setInputOption($option);
     return $query;
 }
示例#4
0
 /**
  * (non-PHPdoc)
  *
  * @param Query $query
  *            The query to add the action to
  * @return Query
  * @see Action::perform()
  * @throws \BadMethodCallException if density has already been called
  */
 public function perform(Query $query)
 {
     $query->notWith('density', Query::ARGUMENT_TYPE_INPUT);
     $query->notWith('density', Query::ARGUMENT_TYPE_OUTPUT);
     if ($this->output) {
         $query->setOutputOption(" -density " . $this->width . "x" . $this->height);
     } else {
         $query->setInputOption(" -density " . $this->width . "x" . $this->height);
     }
     return $query;
 }
示例#5
0
文件: Layers.php 项目: localgod/karla
 /**
  * (non-PHPdoc)
  *
  * @param Query $query
  *            The query to add the action to
  * @return Query
  * @see Action::perform()
  */
 public function perform(Query $query)
 {
     $query->setInputOption(" -layers " . $this->method);
     return $query;
 }
示例#6
0
文件: Rotate.php 项目: localgod/karla
 /**
  * (non-PHPdoc)
  *
  * @param Query $query
  *            The query to add the action to
  * @return Query
  * @see Action::perform()
  */
 public function perform(Query $query)
 {
     $query->notWith('rotate', Query::ARGUMENT_TYPE_INPUT);
     $query->setInputOption(' -rotate "' . $this->degree . '"');
     return $query;
 }
示例#7
0
文件: Strip.php 项目: localgod/karla
 /**
  * (non-PHPdoc)
  *
  * @param Query $query
  *            The query to add the action to
  * @return Query
  * @see Action::perform()
  */
 public function perform(Query $query)
 {
     $query->notWith('strip', Query::ARGUMENT_TYPE_INPUT);
     $query->setInputOption(" -strip ");
     return $query;
 }
示例#8
0
 /**
  * (non-PHPdoc)
  *
  * @param Query $query
  *            The query to add the action to
  * @return Query
  * @see Action::perform()
  */
 public function perform(Query $query)
 {
     $query->notWith('colorspace', Query::ARGUMENT_TYPE_OUTPUT);
     $query->setOutputOption(" -colorspace " . $this->colorspace . ' ');
     return $query;
 }
示例#9
0
 /**
  * (non-PHPdoc)
  *
  * @param Query $query
  *            The query to add the action to
  * @return Query
  * @see Action::perform()
  */
 public function perform(Query $query)
 {
     $query->notWith('polaroid', Query::ARGUMENT_TYPE_INPUT);
     $query->setInputOption(" -polaroid " . $this->angle . '');
     return $query;
 }
示例#10
0
文件: Resize.php 项目: localgod/karla
 /**
  * (non-PHPdoc)
  *
  * @param Query $query
  *            The query to add the action to
  * @return Query
  * @see Action::perform()
  */
 public function perform(Query $query)
 {
     $query->notWith('resize', Query::ARGUMENT_TYPE_INPUT);
     $query->notWith('resample', Query::ARGUMENT_TYPE_INPUT);
     $option = " -resize ";
     if ($this->width != '') {
         $option .= $this->width;
     }
     if ($this->height != '') {
         $option .= "x" . $this->height;
     }
     if ($this->aspect == Resize::ASPECT_FILL) {
         $option .= "^";
     }
     if ($this->dontScaleUp) {
         $option .= "\\>";
     }
     if (!$this->maintainAspectRatio) {
         $option .= "!";
     }
     $option .= " ";
     $query->setInputOption($option);
     return $query;
 }
示例#11
0
 /**
  * (non-PHPdoc)
  *
  * @param Query $query
  *            The query to add the action to
  * @return Query
  * @see Action::perform()
  */
 public function perform(Query $query)
 {
     $query->notWith('gravity', Query::ARGUMENT_TYPE_INPUT);
     $query->setInputOption(" -gravity " . $this->gravity);
     return $query;
 }
示例#12
0
文件: Type.php 项目: localgod/karla
 /**
  * (non-PHPdoc)
  *
  * @param Query $query
  *            The query to add the action to
  * @return Query
  * @see Action::perform()
  */
 public function perform(Query $query)
 {
     $query->notWith('type', Query::ARGUMENT_TYPE_OUTPUT);
     $query->setOutputOption(" -type " . $this->type . ' ');
     return $query;
 }
示例#13
0
文件: Sepia.php 项目: localgod/karla
 /**
  * (non-PHPdoc)
  *
  * @param Query $query
  *            The query to add the action to
  * @return Query
  * @see Action::perform()
  */
 public function perform(Query $query)
 {
     $query->notWith('sepia-tone', Query::ARGUMENT_TYPE_OUTPUT);
     $query->setOutputOption(" -sepia-tone " . $this->threshold . '% ');
     return $query;
 }
示例#14
0
文件: Size.php 项目: localgod/karla
 /**
  * (non-PHPdoc)
  *
  * @param Query $query
  *            The query to add the action to
  * @return Query
  * @see Action::perform()
  */
 public function perform(Query $query)
 {
     $query->notWith('size', Query::ARGUMENT_TYPE_INPUT);
     $query->setInputOption(" -size " . $this->width . "x" . $this->height . " ");
     return $query;
 }