用R来显示tcltk窗口中的图像...怎么样? [英] display image in tcltk window with R... How?

查看:260
本文介绍了用R来显示tcltk窗口中的图像...怎么样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁能告诉我如何在tcltk窗口中取消图像?

Can anyone tell me how to dislpay an image in a tcltk window ?

我在这里找到了 Img 包: sourceforge (1.3版本)
但由于缺少描述,我无法手动安装文件。

I found Img package here : sourceforge (1.3 version) but I can't install it manually because of missing 'DESCRIPTION' file.

如何安装?

- >如何在tcltk窗口上显示图像(是否使用Img包?)

-> How can I display image on a tcltk window (using Img package or not) ?

谢谢

配置:Windows 7 64位,R 3.0.1

Config : Windows 7 64 bits, R 3.0.1

推荐答案

您可以使用以下标签:

w <- tktoplevel()
tcl("image","create","photo", "imageID", file="your_image.gif")
l <- ttklabel(w, image="imageID", compound="image")
tkpack(l)

这仅支持有限数量的文件格式。

This only supports a limited number of file formats though.

这篇关于用R来显示tcltk窗口中的图像...怎么样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆