【发布时间】:2012-01-29 02:02:47
【问题描述】:
我正在使用 c# 中的 SWFtoImage 工具将 swf 文件转换为 png 图像。我能够成功转换文件,但问题是透明度。转换后的图像包含black background,而不是transparent,您可以在附件中看到。
我该如何解决这个问题?由于该工具无法创建透明图像,是否可以在 .net 中对converted png image 进行操作并使其背景透明?
当前代码:
//Namespace: BytescoutSWFToVideo;
// Create an instance of SWFToVideo ActiveX object
SWFToVideo converter = new SWFToVideo();
// Register SWFToVideo
converter.RegistrationName = "demo";
converter.RegistrationKey = "demo";
// set input SWF file
converter.InputSWFFileName = @"D:\image2069.swf";
// Enable trasparency
converter.RGBAMode = true;
// Extract all frames to .\Output sub-folder
converter.ConvertAllToPNG(@"D:\Result\");
【问题讨论】:
-
为什么你的问题被标记为
c#和.net? -
因为,我希望它在 c# 中完成;
is it possible in .net to manipulate on the converted png image and make its background transparent? -
好的,那么您当前的代码是什么样的?
标签: c# .net image flash transparency