我可以向Picture Control 里面导入图片吗?
主要软件: LabVIEW Development Systems>>LabVIEW Full Development System
主要软件版本: 7.1
主要软件修正版本: N/A
次要软件: N/A
问题: 我可以向Picture Control 里面导入图片吗?
解答: 你不能把图片直接拷贝和粘贴到 Picture Control中。尽管如此,你可以把图片读到一个 pixmap里,pixmap是一个二维数组,每个数据点映射一个颜色。 可以用在
Functions » Graphics & Sound » Graphics Formats palette中的Read PNG File, Read JPEG File,和 Read BMP File VIs来实现 。你可以用 Draw Flattened Pixmap (它替代了 LabVIEW 6.1中 Draw 1-bit Pixmap, Draw 4-bit Pixmap, Draw 8-bit Pixmap,和 Draw True-Color Pixmap VIs。) 把图片显示到Picture Control中。这些VIs 位于
Functions » Graphics & Sound » Picture Functions palette中。
下面是一个读取 JPEG 图片并把它显示在 Picture Control中的例子。

注意: Picture Control和 Picture Ring是不一样的。在LabVIEW 7.x 中,你可以把一个图片直接拖入到 Picture Ring Control中或从其中拖出。
相关链接: Developer Zone Example: Read Image Plus
附件:
报告日期: 12/08/2006
最近更新: 12/12/2007
文档编号: 21L8N1LI
Other Support Options
Ask the NI Community
Collaborate with other users in our discussion forums
Request Support from an Engineer
A valid service agreement may be required, and support options vary by country.