99 $this->_resizeProportional =
true;
118 $this->_name = $pValue;
138 $this->_offsetX = $pValue;
158 $this->_offsetY = $pValue;
179 if ($this->_resizeProportional && $pValue != 0) {
181 $this->_height = round($ratio * $pValue);
185 $this->_width = $pValue;
207 if ($this->_resizeProportional && $pValue != 0) {
209 $this->_width = round($ratio * $pValue);
213 $this->_height = $pValue;
234 if ($this->_resizeProportional && !($width == 0 || $height == 0)) {
235 if (($xratio * $this->_height) < $height) {
236 $this->_height = ceil($xratio * $this->_height);
237 $this->_width = $width;
239 $this->_width = ceil($yratio * $this->_width);
240 $this->_height = $height;
262 $this->_resizeProportional = $pValue;
272 return basename($this->_path);
281 $parts = explode(
".", basename($this->_path));
302 public function setPath($pValue =
'', $pVerifyFile =
true) {
304 if (file_exists($pValue)) {
305 $this->_path = $pValue;
307 if ($this->_width == 0 && $this->_height == 0) {
309 list($this->_width, $this->_height) = getimagesize($pValue);
312 throw new Exception(
"File $pValue not found!");
315 $this->_path = $pValue;
341 $vars = get_object_vars($this);
342 foreach ($vars as $key => $value) {
343 if (is_object($value)) {
344 $this->$key = clone $value;
346 $this->$key = $value;