Windows“性能监视器”是什么 我应该使用哪些设置来调试引发 InvalidBitmap 错误的 Flash 影片?

发布于 2024-07-24 22:33:00 字数 767 浏览 6 评论 0原文

这是我的问题:

我有一个 Flash swf,它从本地计算机上传文件,如果它们是图像,它会根据需要调整它们的大小。 这涉及从 bitmapData 对象创建 JPGEncoded 字节数组。 在我完成 bitmapData 后,我将其 dispose() 。

我注意到,有时调整图像大小时闪存会卡住,并已将其追踪到“无效的位图数据”错误消息。 我昨晚下班前尝试过,它在 2 张图片后抛出此消息! 今天早上一切似乎都很好,所以我决定推送它并尝试上传 20 张 5616x3744 像素和 5.32MB 的图像(与我之前尝试过的相同图像)。

我在 Windows 中打开性能监视器,并开始在 Mozilla + Firebug 中运行的 SWF 中上传,以达到良好的效果。 大约 12 张图像效果很好,但到了第 13 张(!!),它又冻结了。 我附上了性能周一图表的屏幕截图。

替代文本

我想我需要做更多这样的测试来看看哪里有问题。 任何人都可以阐明我在这里看到的可能导致问题的内容 - 黄线看起来很可疑!(?)

大的绿色尖峰对应于重新绘制位图数据,我认为较小的绿色尖峰正在从同一位图对象绘制缩略图版本大版本已成功加载。 我应该使用哪些其他计数器来监视内存使用情况等。

如有任何建议,我们将不胜感激。 非常感谢

Here's my problem:

I have a Flash swf that uploads files from local machine and if they are images it resizes them if needed. This involves creating a JPGEncoded bytearray from a bitmapData object. After im finished with the bitmapData I dispose() of it.

I am noticing that flash will get stuck while resizing an image sometimes and have tracked this down to an "invalid bitmapData" error message. I tried last night before leaving work and it was throwing this message after 2 images!! This morning it all seemed to be fine so I decided to push it and tried uploading 20 images of 5616x3744 pixels and 5.32MB (the same images I tried previously).

I switched on performance monitor in windows and started the upload in the SWF running in mozilla + firebug for good measure. Things worked great for about 12 images then on the 13th (!!) it froze again. Ive attached a screenshot of the graph from performance mon.

alt text

Im guessing I need to do more tests like this to see where there are any problems. Can anyone shed some light on what Im seeing here that might cause problems - the yellow line looks suspicious!(?)

Large green spike corresponds to redrawing the bitmapData I think and the smaller green spike is drawing a thumbnail version from the same Bitmap object after the large version has been successfully loaded. What other counters should I use to monitor memory usage etc.

Any advice is appreciated.
many thanks

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

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

发布评论

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

评论(1

窝囊感情。 2024-07-31 22:33:00

你的像素太多了,仅此而已。
在 Flash Player 10 中,位图的最大像素数为 si 16,777,215(或 0xFFFFFF)。 此外,只要总像素数低于最大值,最大宽度或高度就是 8,191。
您的测试位图有 21,026,304,这远远超出了上限。

You've got too many pixels, that's all.
In Flash Player 10, the maximum number of pixels a bitmap can have si 16,777,215 (or 0xFFFFFF). Also, the maximum width or height is 8,191, as long as the total pixel count is under the maximum value.
Your test bitmap has 21,026,304, which is way over the top.

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