1

我正在尝试使用 SWFupload 客户端调整大小,当前存在由应用模糊过滤器引起的错误。我在网上找到了一个解决方案,但它只给出了解决方案的描述,而不是最终的 swf 文件。答案是......

I wrapped the blurFilter code in loaderComplete() in ImageResizer.as with the following     if statement and now everything works like a charm:

if (bmp.width * bmp.height < 0x01000000) {
  // existing blur if statement and code

} 

我在我认为它引用的 AS 文件中找到了原始点...

// Blur it a bit if it is sizing smaller
if (this.newWidth < bmp.width || this.newHeight < bmp.height) {
// Apply the blur filter that helps clean up the resized image result
var blurMultiplier:Number = 1.15; // 1.25;
var blurXValue:Number = Math.max(1, bmp.width / this.newWidth) * blurMultiplier;
var blurYValue:Number = Math.max(1, bmp.height / this.newHeight) * blurMultiplier;

var blurFilter:BlurFilter = new BlurFilter(blurXValue, blurYValue,           int(BitmapFilterQuality.LOW));
bmp.applyFilter(bmp, new Rectangle(0, 0, bmp.width, bmp.height), new Point(0, 0),     blurFilter);
}

有人可以更熟练地使用动作脚本来解释如何将修复应用于此代码吗?我想我可以使用 FlashDevelop 重新编译为 SWF

4

0 回答 0