/** * (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; }
/** * (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; }
/** * (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; }
/** * (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; }
/** * (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; }
/** * (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; }
/** * (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; }
/** * (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; }
/** * (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; }
/** * (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; }
/** * (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; }
/** * (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; }
/** * (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; }
/** * (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; }