Flash 图像库 - 通过 xml 加载图像调整图像大小

发布于 2024-12-01 15:45:48 字数 475 浏览 2 评论 0原文

我有一个通过 xml 加载图像的 Flash 图像库。必须将图像裁剪为缩略图。所以你必须有两个文件夹,一个用于缩略图,另一个用于大尺寸图像。我想知道是否有一种方法可以仅加载一张图像(而不是该图像的缩略图)并使用脚本或其他内容来调整该图像的大小以获取缩略图。为了让我的自我更清楚,这里是 xml 代码:(

pic  image../gallery_flash/imageGallery/images/watches/i1005.jpg  image
    thumb../gallery_flash/imageGallery/thumbs/watches/i1005.jpg thumb       
pic

由于某种原因,它没有正确显示 xml...)

我不想使用该行(thumb>../gallery_flash.),但是仅加载一张图像并获取缩略图。我不知道我是否表达清楚或者我的英语是否好。先感谢您!期待阅读回复!

I have a flash image gallery that loads images through xml. Images have to be croped for thumbnails. So u have to have two folders, one for the thumbnails an another file for the big size images. I would like to know if there is a way to load only one image ( and not this image's thumbnail too) and with a script or something, to resize this image to get the thumbnail. To make my self clearer here is the xml code:

pic  image../gallery_flash/imageGallery/images/watches/i1005.jpg  image
    thumb../gallery_flash/imageGallery/thumbs/watches/i1005.jpg thumb       
pic

(For some reason it doesnt show the xml right...)

I dont want to have the line ( thumb>../gallery_flash.), but only load one image and get the thumbnail also. I dont know if i made my self clear or if my english is good. Thank you in advance! Look forward to reading a responce!

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

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

发布评论

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

评论(1

有木有妳兜一样 2024-12-08 15:45:48

获取大图像位图并按比例将其绘制在 BitmapData 上:

const zoom:Number = 0.1;
var matrix:Matrix = new Matrix;
matrix.scale(zoom, zoom);

var _thumbBitmap:BitmapData = new BitmapData(THUMB_WIDTH, THUMB_HEIGHT, false, 0xFFFFFF);
_thumbBitmap.draw(yourImageBitmap, matrix, null, null, null, true);

更多:http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/BitmapData.html#draw%28%29

Take your big image bitmap and draw it on BitmapData with scale:

const zoom:Number = 0.1;
var matrix:Matrix = new Matrix;
matrix.scale(zoom, zoom);

var _thumbBitmap:BitmapData = new BitmapData(THUMB_WIDTH, THUMB_HEIGHT, false, 0xFFFFFF);
_thumbBitmap.draw(yourImageBitmap, matrix, null, null, null, true);

More: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/BitmapData.html#draw%28%29

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