Is there a way to convert image with R ? JPEG to GIF for example -
i wish display images in tcltk window (not in r device) using r simpliest method (below) supports gif files :
require(tcltk) tcl("image","create","photo", "imageid", file="a.gif") w <- tktoplevel() l <- ttklabel(w, image="imageid", compound="image") tkpack(l)
and files png/jpeg (file containing histograms generated program itself)
someone has idea conversion ?
thank you
despite warnings seems succeed:
png("test.png") plot(1,1) dev.off() #quartz # 2 library(png) help(package="png") img <- readpng("test.png") str(img) # num [1:480, 1:480, 1:4] 1 1 1 1 1 1 1 1 1 1 ... require(catools) #loading required package: catools write.gif(img, "test.gif", scale="always") #----------------- warning message: in if (col == "jet") col = colorramppalette(c("#00007f", "blue", : condition has length > 1 , first element used
Comments
Post a Comment