private function get_dimensions($newWidth, $newHeight, $option)
        {
            switch ($option) {
                case 'exact':
                    $optimalWidth  = $newWidth;
                    $optimalHeight = $newHeight;
                    break;
                case 'portrait':
                    $optimalWidth  = $this->getSizeByFixedHeight($newHeight);
                    $optimalHeight = $newHeight;
                    break;
                case 'landscape':
                    $optimalWidth  = $newWidth;
                    $optimalHeight = $this->getSizeByFixedWidth($newWidth);
                    break;
                case 'auto':
                    $option_array   = $this->getSizeByAuto($newWidth, $newHeight);
                    $optimalWidth   = $option_array['optimalWidth'];
                    $optimalHeight  = $option_array['optimalHeight'];
                    break;
                case 'fit':
                    $option_array   = $this->getSizeByFit($newWidth, $newHeight);
                    $optimalWidth   = $option_array['optimalWidth'];
                    $optimalHeight  = $option_array['optimalHeight'];
                    break;
                case 'crop':
                    $option_array   = $this->getOptimalCrop($newWidth, $newHeight);
                    $optimalWidth   = $option_array['optimalWidth'];
                    $optimalHeight  = $option_array['optimalHeight'];
                    break;
            }

            return array(
                'optimalWidth'     => $optimalWidth,
                'optimalHeight'    => $optimalHeight
           );
        }