JPEG artifacts removal in C#

Posted by Arcturus on Stack Overflow See other posts from Stack Overflow or by Arcturus
Published on 2009-08-02T14:20:11Z Indexed on 2010/03/18 22:51 UTC
Read the original article Hit count: 635

Filed under:
|
|
|

Hi all

I am building a website for a club that is part of a mother organisation. I am downloading (leeching ;) ) the images that where put on profile pages of the mother organisation to show on my own page. But their website has a nice white background, and my website has a nice gray gradient on the background. This does not match nicely. So my idea was to edit the images before saving them to my server.

I am using GDI+ to enhance my images, and when I use the method MakeTransparent of Bitmap, it does work, and it does do what its supposed to do, but I still have these white jpeg artifacts all over the place. The artifacts makes the image so bad, I am better off not making the image transparent and just leaving it white, but thats really ugly on my own website. I can always at a nice border with a white background of course, but I rather change the background to transparent.

So I was wondering if and how I can remove some simple JPEG artifacts in C#. Has anyone ever done this before?

Thanks for your time.

Example image:

TB-5404

Transformed image:

TB-5404 transformed

© Stack Overflow or respective owner

Related posts about c#

Related posts about image-processing