2
我希望顯示在tcltk窗口(未在A R裝置)使用R圖像但simpliest方法(下文)僅支持GIF文件:有沒有辦法將圖像轉換爲R? JPEG至GIF例如
require(tcltk)
tcl("image","create","photo", "imageID", file="a.gif")
w <- tktoplevel()
l <- ttklabel(w, image="imageID", compound="image")
tkpack(l)
和我在我的文件爲png/jpeg(包含我的程序本身生成的直方圖的文件)
某人有想做這種轉換的想法嗎?
謝謝
或者,你可以使用的ImageMagick的文件格式非常輕鬆轉換。 –
是的,但我希望它是自動的。 – user2551551
@ user2551551 - 你可以使用'system()'調用從R中調用imagemagick,然後繼續快樂的方式。 – thelatemail