private function get_dimensions($new_width, $new_height, $option)
    {
        switch ($option) {
            case 'exact':
                $optimal_width  = $new_width;
                $optimal_height = $new_height;
                break;
            case 'portrait':
                $optimal_width  = $this->get_size_by_fixed_height($new_height);
                $optimal_height = $new_height;
                break;
            case 'landscape':
                $optimal_width  = $new_width;
                $optimal_height = $this->get_size_by_fixed_width($new_width);
                break;
            case 'auto':
                $option_array   = $this->get_size_by_auto($new_width, $new_height);
                $optimal_width  = $option_array['optimal_width'];
                $optimal_height = $option_array['optimal_height'];
                break;
            case 'fit':
                $option_array   = $this->get_size_by_fit($new_width, $new_height);
                $optimal_width  = $option_array['optimal_width'];
                $optimal_height = $option_array['optimal_height'];
                break;
            case 'crop':
                $option_array   = $this->get_optimal_crop($new_width, $new_height);
                $optimal_width  = $option_array['optimal_width'];
                $optimal_height = $option_array['optimal_height'];
                break;
        }

        return array(
            'optimal_width'  => $optimal_width,
            'optimal_height' => $optimal_height,
        );
    }