Alex Rivera | Logout

Remove transparency in images with C#

Asked 2009-03-06T09:51:59.113
14

does anyone know a smooth / fast way of removing transparency from e.g. pngs/tiffs etc and replacing it with a white background?

Basically what I need this for is I need to create PDF/A compatible images, which may, according to the spec, have -no- transparency (and therefore a fixed white background is fine).

Any ideas / suggestions?

Cheers & thanks, -Jörg

Edit
Report

1 Answer

1

Adding to Stormenet's answer; remember to wrap all Bitmap and Graphics objects with "using" statement to dispose unmanaged resources.

answered 2012-05-23T23:13:04.103

Your Answer