コード例 #1
0
        // method that take the file loaded from the computer and copies it to the square canvas in the form to match the canvas
        public Bitmap CopyToSquareCanvas(Bitmap originalBitmap, int canvasWidthLenght)
        {
            Bitmap previewBitmap = null;

            try
            {
                previewBitmap = bitmap.CopyToSquareCanvas(originalBitmap, canvasWidthLenght);
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine(e.Message);
            }
            return(previewBitmap);
        }