我有这段代码:
filePaths <- filePathFunction(files)
image(readPNG(filePaths[1]), useRaster=TRUE, axes=FALSE)
image_resize(image_read(filePaths[1]), "60x60!")
plot(f)
png("myplot.png")
dev.off()
它应该使用readPNG来收集PNG图像的光栅数组,我想要做的是将所有图像从200x200大小更改为60x60大小然后保存它们。我无法使用dev.off()执行此操作,因为r会调整背景以及其上的图像。