Interested ?
You may go further at : https://docs.aspose.com/net/developer-guide/how-to/save-transparent-image
Interested ?
You may go further at : https://docs.aspose.com/net/developer-guide/how-to/save-transparent-image
using Aspose.Imaging; | |
using Aspose.Imaging.FileFormats.Png; | |
using Aspose.Imaging.ImageOptions; | |
using System.IO; | |
string templatesFolder = @"c:\Users\USER\Downloads"; | |
var inputFile = Path.Combine(templatesFolder, $"template.gif"); | |
var outputFile = Path.Combine(templatesFolder, $"output.png"); | |
using (var image = (RasterImage)Aspose.Imaging.Image.Load(inputFile)) | |
{ | |
image.Save( | |
outputFile, | |
new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha }); | |
} | |
File.Delete(outputFile); |
using Aspose.Imaging; | |
using Aspose.Imaging.FileFormats.Png; | |
using Aspose.Imaging.ImageOptions; | |
using System.IO; | |
string templatesFolder = @"c:\Users\USER\Downloads"; | |
var inputFile = Path.Combine(templatesFolder, $"template.png"); | |
var outputFile = Path.Combine(templatesFolder, $"output.png"); | |
using (var image = (RasterImage)Aspose.Imaging.Image.Load(inputFile)) | |
{ | |
image.Save( | |
outputFile, | |
new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha }); | |
} | |
File.Delete(outputFile); |
using Aspose.Imaging; | |
using Aspose.Imaging.FileFormats.Png; | |
using Aspose.Imaging.ImageOptions; | |
using System.IO; | |
string templatesFolder = @"c:\Users\USER\Downloads"; | |
var inputFile = Path.Combine(templatesFolder, $"template.tiff"); | |
var outputFile = Path.Combine(templatesFolder, $"output.png"); | |
using (var image = (RasterImage)Aspose.Imaging.Image.Load(inputFile)) | |
{ | |
image.Save( | |
outputFile, | |
new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha }); | |
} | |
File.Delete(outputFile); |
using Aspose.Imaging; | |
using Aspose.Imaging.FileFormats.Png; | |
using Aspose.Imaging.ImageOptions; | |
using System.IO; | |
string templatesFolder = @"c:\Users\USER\Downloads"; | |
var inputFile = Path.Combine(templatesFolder, $"template.webp"); | |
var outputFile = Path.Combine(templatesFolder, $"output.png"); | |
using (var image = (RasterImage)Aspose.Imaging.Image.Load(inputFile)) | |
{ | |
image.Save( | |
outputFile, | |
new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha }); | |
} | |
File.Delete(outputFile); |