闪存缩放质量

发布于 2024-09-13 14:07:13 字数 379 浏览 5 评论 0原文

我有一个 Flash 应用程序,需要在其中缩放 MovieClip。该MovieClip 包含一个分辨率为1024x768 的图像(在Loader 中)(这也是MovieClip 的大小)。

当我想将此 MovieClip 缩放到 80% 时,我这样做:

myMovieClip.scaleX = 0.8;
myMovieClip.scaleY = 0.8;

问题是生成的缩放图像存在锯齿并且质量不佳。有没有办法改变用于获得更好图像的缩放算法?或者有更好的方法来缩放MovieClips吗?

我不能依赖位图数据,因为此 MovieClip 可能包含另一个带有视频的 SWF,并且无论其内部内容如何,​​它都必须进行缩放。

谢谢。

I have a flash application in which I need to scale a MovieClip. This MovieClip contains an image (in a Loader) with a resolution of 1024x768 (which is the size of the MovieClip as well).

When I want to scale this MovieClip to 80% I do:

myMovieClip.scaleX = 0.8;
myMovieClip.scaleY = 0.8;

The problem is the resulting scaled image has aliasing and is not of good quality. Is there a way to change the scaling algorithm used to get a better image? Or is there a better way to scale MovieClips?

I can't rely on bitmap data because this MovieClip may contain another SWF with video for example and it must scale regardless of its internal content.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

惟欲睡 2024-09-20 14:07:13

我无法对已接受的答案发表评论,但可能缺少的第二个链接是这个:
Bitmap.smoothing - 如何减少图像失真

来自链接:要减少调整位图大小时的失真,如果它是外部加载的图像:

var image:Bitmap=loader.content as Bitmap;
image.smoothing=true;

如果它是来自库的位图,只需检查其属性“允许平滑”

I can't comment on the accepted answer but probably the missing second link is this one:
Bitmap.smoothing - how to reduce image distortion

From the link: To reduce distortion when resizing a Bitmap, if it's an image loaded externally:

var image:Bitmap=loader.content as Bitmap;
image.smoothing=true;

If it's an Bitmap from the library, just check its property "Allow smoothing"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文