function setResizeMethod($method)
    {
        switch ($method)
        {
            case 1:
            case 'resize':
                $this->_resize_function = 'imagecopyresized';
                break;
            case 2:
            case 'resample':
                if (!function_exists('imagecopyresampled'))
                {
                    // no error message. just return false.
                    return null;
                }
                $this->_resize_function = 'imagecopyresampled';
                break;
            case 3:
            case 'resample_workaround':
            case 'workaround':
            case 'bicubic':
                $this->_resize_function = '$this->_imageCopyResampledWorkaround';
                break;
            case 4:
            case 'resample_workaround2':
            case 'workaround2':
            case 'bicubic2':
                $this->_resize_function = '$this->_imageCopyResampledWorkaround2';
                break;
            default:
                return null;
        }
        return true;
    }