Beispiel #1
0
        /// <summary>
        ///  Format a video crop argument for ffmpeg.
        /// </summary>
        public static string formatCropArg(string file, ImageSize size, ImageCrop crop)
        {
            ImageSize outSize = UtilsVideo.getResolutionToUseWithCrop(file, size, crop);

            string cropArg = String.Format("crop={0}:{1}:{2}:{3}",
                                           outSize.Width - crop.Left - crop.Right,  // {0}
                                           outSize.Height - crop.Top - crop.Bottom, // {1}
                                           crop.Left,                               // {2}
                                           crop.Top);                               // {3}

            return(cropArg);
        }