public void RemoveTransparency(string filename) { using (System.Drawing.Bitmap src = new System.Drawing.Bitmap(filename)) { using (System.Drawing.Bitmap target = new System.Drawing.Bitmap(src.Size.Width, src.Size.Height)) { using (System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(target)) { g.Clear(System.Drawing.Color.White); g.DrawImage(src, 0, 0); } target.Save("Full path of file"); } } }
world wide web development problems asp net php html xhtml css javascript jquery w3dproblems
Sunday, January 19, 2014
Remove transparency in images with C#
Remove Transparency from png's in c# or asp net c#
Saving Image To MemoryStream asp net c#
Use this function to convert image to byte array
public byte[] GetByte(System.Drawing.Image image) { using (System.IO.MemoryStream m = new System.IO.MemoryStream()) { image.Save(m, image.RawFormat); return m.ToArray(); } }
Subscribe to:
Posts (Atom)