Example #1
0
        public static void saveToFile(String uri, String fullname)
        {
            try
            {
                //path += ".jpg";

                //Copy.Save(path,ImageFormat.Jpeg);
                byte[] data = Discogs.GetImage(uri);
                using (FileStream fs = new FileStream(fullname, FileMode.OpenOrCreate))
                {
                    fs.Write(data, 0, data.Length);

                    //fs.Close();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString()); //TODO logging
            }
        }
Example #2
0
 public byte[] getData()
 {
     return(Discogs.GetImage(Uri));
 }