I want to essentially take an image with $n \times n$ pixels and expand it into a sparse array, spacing out the pixels by a factor $2$ or $3$. Each pixel in the input image occupies one of the corners of a cell of $2 \times 2$ or $3 \times 3$ new pixels in the expanded image, with the other $n \times (n - 1)$ pixels (in each cell) set to $0$.
So, I want to create a padded array where:
If one line of data is
then the output should be
W0 X0 Y0 Z0 00 00 00 00
I think Mathematica's
SparseArray might be the way to go, but I'm not sure how to go about implementing this.