Flash CS3 中的模糊 .png

发布于 2024-07-06 13:06:33 字数 83 浏览 6 评论 0原文

PNG 图像在 Flash CS3 中显得“模糊”。 它们非常块状并且看起来没有抗锯齿(如果这是一个词)有人可以解决这个问题吗? 我缺少一些设置吗?

PNG images appear "fuzzy" in flash CS3. They are very blocky and appear unanti-aliased (if that is a word) Does anyone have a fix for this? Is there some setting I'm missing?

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

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

发布评论

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

评论(8

居里长安 2024-07-13 13:06:33

您是否通过加载程序将它们加载到 SWF 中? 或者它们作为位图符号导入到您的库中? 如果它们已加载,请尝试调用 Bitmap.smoothing = true; 或者,如果它们在您的库中,请转到位图属性并单击允许平滑。

除此之外,我会检查以确保您没有一些疯狂的高于 1 alpha 设置,或者您在任何时候都不会在代码中弄乱它的比例。 这两个选项往往会扰乱位图图像的模糊性。

如果所有其他方法都失败了,您可能想考虑将图像转换为基于矢量图形,那么无论缩放比例如何,它们总是看起来完全符合您的要求。

Are you loading them into your SWF through a loader? Or are they imported into your library as bitmap symbols? If they are loaded in try calling Bitmap.smoothing = true; or if they are in your library go to the Bitmap's properties and click Allow smoothing.

Other than that I would check to make sure you don't have some crazy above 1 alpha setting or that you aren't messing with the scale of it in your code at any time. Those two options tend to mess with bitmap images fuzziness.

If all else fails you'd probably want to look into turning your images into vector based graphics, then they'd always look exactly how you'd want them to regardless of scaling.

千纸鹤 2024-07-13 13:06:33

如果您完全缩放位图图像,它们将会变得“模糊”,这就是图形的本质。 另请检查您的发布设置,它可能会将它们转换为低质量设置的 JPEG。

Bitmap images will be 'fuzzy' if you scale them at all, that's just the nature of graphics. Also check your publishing settings, it might be converting them to JPEG with a low quality setting.

紙鸢 2024-07-13 13:06:33

如果您的 png 图像在 Flash 中显示为“锯齿”(或锯齿,而不是抗锯齿),但在 Photoshop 中看起来不错,那么可能是因为它们A:调整大小,B:未打开“平滑”(平滑本质上是动态抗锯齿)。

每当您将图像大小调整为远离 1:1 像素与屏幕比例时,渲染器都必须计算出要剪切(在缩小的情况下)或复制(在放大的情况下)的像素。

如果没有进行平滑处理,那么您将看到锯齿状伪影,尤其是沿着高对比度的边缘区域。

您可以通过双击库中的位图并选中“允许平滑”复选框来在 IDE 中打开平滑功能。

您还可以通过编程方式打开它,如下所示:

myBitmap.smoothing = true;

If your png image is appearing 'jaggy' (or aliased rather than anti-aliased) in flash, but it looks fine in Photoshop, then it is probably due to them being A: resized, and B: not having 'smoothing' turned on (smoothing is essentially dynamic anti-aliasing).

Whenever you resize an image away from a 1:1 pixel to screen ratio then the renderer has to work out which pixels to either cut (in the case of reduction) or duplicate (in the case of enlargement).

If there is no smoothing being done then you will see jagged artifacts, especially along edge areas of high contrast.

You can turn on smoothing in the IDE by double clicking on the bitmap in your Library and checking the "Allow smoothing" checkbox.

You can also turn it on programmatically like so:

myBitmap.smoothing = true;
今天小雨转甜 2024-07-13 13:06:33

最简单的方法是右键单击图像,然后单击“拆分”。

The easiest way to do it is to right click on the image then Break Apart.

茶底世界 2024-07-13 13:06:33

我遇到了同样的问题,结果发现我加载 PNG 的电影的 alpha 值设置为 100。这是不正确的,因为在 AS3 中它是一个介于 0 和 1 之间的值。当我设置电影到 1,PNG 就清晰了。

I had this same problem, and it turned out that the movie into which I had loaded the PNGs was set to an alpha of 100. This was incorrect, as in AS3 it's a value between 0 and 1. When I set the alpha of the movie to 1, the PNGs cleared up just fine.

深空失忆 2024-07-13 13:06:33

在库中,右键单击导入的位图并选择“属性”,然后将压缩从照片 (JPEG) 更改为无损 (PNG/GIF)。

In your library, right click the imported bitmap and select "properties," and change the compression from Photo (JPEG) to Lossless (PNG/GIF).

第七度阳光i 2024-07-13 13:06:33

我也遇到了同样的问题,但是在出版物属性中停用 JPG Degroup 可以解决这个问题。

I had the same problem, but deactivating JPG Degroup, in publication properties, fixes it for me.

红墙和绿瓦 2024-07-13 13:06:33

好吧,我尝试使用 image.opaqueBackground = 0x000000; 看起来工作正常,抗锯齿效果要好得多,但是,这击败了过程中透明背景的想法。
这确实令人愤怒,Adobe,对此采取措施吧!

Well I tried using image.opaqueBackground = 0x000000; and it seems working fine, antialiasing is much better, however, this beats the idea of a transparent background in the process.
This is truly angering, Adobe, do something about it!

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