Try writing code in a more functional form
a = {{0., 1., 0.}, {1., 0., 1.}, {0., 1., 0.}, {0., 1., 0.}, {1., 0., 1.}, {0., 1., 0.}, {0., 1., 0.}, {1., 0., 1.}, {0., 1., 0.}};
a // Flatten // Riffle[#, #] & // Partition[#, 6] & // Image
(* Same result *)
For the attached image
image=Import["https://community.wolfram.com//c/portal/getImageAttachment?filename=9a53b9d4650f4f8742bee3ed0cc6f822diamondblackandwhite.jpg&userId=1147177"]
imageData = ImageData@image;
3*Times @@ ImageDimensions@image
(* 215940 *)
When it is riffled with itself it is twice that long. Partition by 6 will result in a tall skinny image.
newImage = imageData // Flatten // Riffle[#, #] & // Partition[#, 6] & // Image;
ImageDimensions@newImage
(* {6, 71980} *)
What exactly are you trying to accomplish?