Last active
June 5, 2020 10:49
-
-
Save beisong7/825ff3156d4800ef801eedb258754bb2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Windows.Forms; | |
using System.IO; | |
using System.Drawing; | |
using System.Drawing.Imaging; | |
/// <summary> | |
/// Summary description for Class1 | |
/// </summary> | |
public class ImageConverter | |
{ | |
public ImageConverter() | |
{ | |
// | |
// TODO: Add constructor logic here | |
// | |
} | |
public string saveToFile(System.Data.Linq.Binary binary, String filename) | |
{ | |
byte[] b = binary.ToArray(); | |
MemoryStream ms = new MemoryStream(b); | |
return this.storeImage(ms, filename); | |
} | |
public string storeImage(MemoryStream ms, String filename) | |
{ | |
string storeFolder = AppDomain.CurrentDomain.BaseDirectory; | |
string img_url = storeFolder + "\\images\\temp\\" + filename + ".Jpeg"; | |
return "images/temp/" + filename + ".Jpeg"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment