R bitmaps and without resizing them

I have a code that rotates an image. But the rotated image has different sizes. How can we guarantee that the rotated images are the same size?

i.e. if the original image has 50 rows and 30 columns, then the rotated image should contain 30 rows and 50 columns.

library(raster) r1 <- brick("watch1.JPG")#please use any jpg image plotRGB(r1) png("SaveThisPlot.png") plotRGB(t(flip(r1, 2))) dev.off() 
0
r rotation raster
source share
1 answer

png("SaveThisPlot.png",width=nrow(r1),height=ncol(r1))

+1
source share

All Articles