public function scale($new_width = null, $new_height = null)
        {
            if(!is_null($new_width) && is_null($new_height))
                $new_height = $new_width * $this->height / $this->width;
            elseif(is_null($new_width) && !is_null($new_height))
                $new_width = $this->width / $this->height * $new_height;
            elseif(!is_null($new_width) && !is_null($new_height)) {
                if($this->width < $this->height)
                    $new_width = $this->width / $this->height * $new_height;
                else
                    $new_height = $new_width * $this->height / $this->width;
            } else
                return false;

            return $this->resize($new_width, $new_height);
        }