/** * Sets a new logo image by given temp file * * @param CUploadedFile $file */ public function setNew(CUploadedFile $file) { $this->delete(); move_uploaded_file($file->getTempName(), $this->getPath()); ImageConverter::Resize($this->getPath(), $this->getPath(), array('height' => $this->height, 'width' => 0, 'mode' => 'max', 'transparent' => $file->getExtensionName() == 'png' && ImageConverter::checkTransparent($this->getPath()))); }