Hi,
I am trying to read an image file (which might be PNG, JPG,, or GIF) and, if it has a transparent background change the background to White, then resize it and writing it out as a GIF file while maintaining the highest quality possible.
I know the code below isn't quite right, I've tried various iterations but been unable to get the background color to change. Any help/suggestions appreciated.
Thanks
I am trying to read an image file (which might be PNG, JPG,, or GIF) and, if it has a transparent background change the background to White, then resize it and writing it out as a GIF file while maintaining the highest quality possible.
I know the code below isn't quite right, I've tried various iterations but been unable to get the background color to change. Any help/suggestions appreciated.
Thanks
MagickImage img = new MagickImage(source);
img.BackgroundColor = new MagickColor(System.Drawing.Color.White);
MagickGeometry geometry = new MagickGeometry(width, height);
geometry.IsPercentage = false;
//geometry.IgnoreAspectRatio = false;
img.Quality = 100;
img.Resize(geometry);
img.Write(target);