微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 嵌入式设计讨论 > FPGA,CPLD和ASIC > tcl 读取 bmp 的方法

tcl 读取 bmp 的方法

时间:10-02 整理:3721RD 点击:
# bitmap.tcl --
#
# This demonstration script creates a toplevel window that displays
# all of Tk's built-in bitmaps.

package require Tk
set font mainFont
# bitmapRow --
# Create a row of bitmap items in a window.
#
# Arguments:
# w -                The window that is to contain the row.
# args -        The names of one or more bitmaps, which will be displayed
#                in a new row across the bottom of w along with their
#                names.
proc bitmapRow {w args} {
    frame $w
    pack $w -side top -fill both
    set i 0
    foreach bitmap $args {
        frame $w.$i
        pack $w.$i -side left -fill both -pady .25c -padx .25c
        label $w.$i.bitmap -bitmap $bitmap
        label $w.$i.label -text $bitmap -width 9
        pack $w.$i.label $w.$i.bitmap -side bottom
        incr i
    }
}
set w .bitmap
catch {destroy $w}
toplevel $w
wm title $w "Bitmap Demonstration"
wm iconname $w "bitmap"

label $w.msg -font $font -wraplength 4i -justify left -text "This window displays all of Tk's built-in bitmaps, along with the names you can use for them in Tcl scripts."
pack $w.msg -side top
## See Code / Dismiss buttons

frame $w.frame
bitmapRow $w.frame.0 error gray12 gray25 gray50 gray75
bitmapRow $w.frame.1 hourglass info question questhead warning
pack $w.frame -side top -expand yes -fill both

请问小编知道如何将图像数据以bmp保存到ddr吗?

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top