I am trying to write code that would remove the white background
from jpeg
-images, can save them in same format.
Here is my code so far:
string imgPath = Server.MapPath("~/App_Files/" + Profile.CompanyName + "/Temp/test.jpg");
Bitmap bmp = RADBase.ImageHandler.LoadImage(imgPath);
bmp.MakeTransparent(Color.White);
System.Drawing.Imaging.ImageFormat format = new System.Drawing.Imaging.ImageFormat(Guid.NewGuid());
bmp.Save(imgPath, format);
It removes the white background, but there are still white edges on the image. not sure how to get the complete white background removed?
Here is the image: http://cyphernet.co.za/bg-test/CGU3-black.jpg
Here is the result: http://cyphernet.co.za/bg-test/test.jpg