How do I resample an image to a rotated grid?
You should read about image transformations. Anyhow, the idea is quite simple:


Compute the inverse transform $T(x,y)$.
For each point $(x,y)$ on the re-sampled grid:


Calculate $T(x,y)$, and find the 4 closest points on the original grid.
Apply interpolation technique (For example, bi-linear) on the neighbors, and put the value in the re-sampled grid.



Some references: 

http://www.cis.rit.edu/class/simg782/lectures/lecture_02/lec782_05_02.pdf
http://www.imageprocessingbasics.com/geometric-transforms/