Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }