public function resize(Image $image, $width, $height, $method)
    {
        // Get Image Dimensions:
        
        $imageWidth  = $image->getWidth();
        $imageHeight = $image->getHeight();
        
        // Calculate Width and Height (if required):
        
        if ($width && !$height && $imageWidth) {
            $height = round(($width / $imageWidth) * $imageHeight);
        } elseif (!$width && $height && $imageHeight) {
            $width = round(($height / $imageHeight) * $imageWidth);
        }
        
        // Perform Image Resizing:
        
        if ($width && $height) {
            
            switch (strtolower($method)) {
                
                case self::RESIZE_CROP_WIDTH:
                    return $image->CropWidth($width);
                    
                case self::RESIZE_CROP_HEIGHT:
                    return $image->CropHeight($height);
                    
                case self::RESIZE_FILL:
                    return $image->Fill($width, $height);
                    
                case self::RESIZE_FILL_MAX:
                    return $image->FillMax($width, $height);
                    
                case self::RESIZE_FILL_PRIORITY:
                    return $image->FillPriority($width, $height);
                    
                case self::RESIZE_FIT:
                    return $image->Fit($width, $height);
                    
                case self::RESIZE_FIT_MAX:
                    return $image->FitMax($width, $height);
                    
                case self::RESIZE_PAD:
                    return $image->Pad($width, $height);
                    
                case self::RESIZE_SCALE_WIDTH:
                    return $image->ScaleWidth($width);
                    
                case self::RESIZE_SCALE_HEIGHT:
                    return $image->ScaleHeight($height);
                    
                case self::RESIZE_SCALE_MAX_WIDTH:
                    return $image->ScaleMaxWidth($width);
                    
                case self::RESIZE_SCALE_MAX_HEIGHT:
                    return $image->ScaleMaxHeight($height);
                    
            }
            
        }
        
        // Answer Original Image:
        
        return $image;
    }