Displaying 1 result from an estimated 1 matches for "outputimag".
Did you mean:
outputimage
2013 Mar 02
1
Raster images and saving with original pixel dimensions in tiff, jpeg, or png perferablly.
...ng guidelines.
####START#####
library(jpeg)
library(grid)
img <- readJPEG(system.file("img", "Rlogo.jpg", package="jpeg"))
grid.raster(img, interpolate =F)
#turnon next line for output. Don't want to accidentally write any
unwanted files.
#dev.copy(tiff, "outputimage.tiff")
dev.off()
#or using package = "graphics" but not perfered.
library(graphics)
plot( c(0, dim(img)[2]), c(0, dim(img)[1]), type = "n", xlab = "", ylab = "")
rasterImage(img, 0, 0, dim(img)[2], dim(img)[1])
#dev.copy(tiff, "outputfile2.tiff&...