예제 #1
0
파일: Thumbnail.cs 프로젝트: Hcq/Rain
        public static void MakeRemoteSquareImage(string url, string newFileName, int newSize)
        {
            Stream remoteImage = Thumbnail.GetRemoteImage(url);

            if (remoteImage == null)
            {
                return;
            }
            Image image = Image.FromStream(remoteImage);

            remoteImage.Close();
            Thumbnail.MakeSquareImage(image, newFileName, newSize);
        }
예제 #2
0
파일: Thumbnail.cs 프로젝트: Hcq/Rain
        public static void MakeRemoteThumbnailImage(
            string url,
            string newFileName,
            int maxWidth,
            int maxHeight)
        {
            Stream remoteImage = Thumbnail.GetRemoteImage(url);

            if (remoteImage == null)
            {
                return;
            }
            Image original = Image.FromStream(remoteImage);

            remoteImage.Close();
            Thumbnail.MakeThumbnailImage(original, newFileName, maxWidth, maxHeight);
        }