如何获取图像的宽度和高度?

发布于 2024-08-17 08:09:06 字数 146 浏览 2 评论 0原文

我正在 Actionscript 3 (FlexBuilder) 中构建一本类似的书,并尝试根据其源文件的尺寸动态调整图像的大小。但是,我发现如果我没有明确说明图像的宽度和高度,它们会跟踪为 0。

这样我就可以缩小图像以适合给定的空间,如何获取宽度和高度源图像?

I'm constructing a book of sorts in Actionscript 3 (FlexBuilder) and am trying to size an image dynamically according to the dimensions of it's source file. But, I've found that if I don't explicitly state the width and height of an image, they trace as 0.

So that I can scale down an image to fit within a given space, how do I get the width and height of a source image?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文