----------------------This image is dedicated to the Public Domain. There are no restrictions on use. Claiming to be the originator or owner, explicitly or implicitly, is bad karma. A link (if appropriate), a note to markdow30@gmail.com, and credit are appreciated but not required.

You can do the block replacement by hand, but it's tedious. The last two arrays ([2x2], [2x2]) specify how symbols (black = 0, white = 1) are replaced by a 2x2 block of new symbols. So 0->[0 10; 0 1 ] and 1->[1 10; 101 1], where 10 indicated the 0 matrix rotated by 1*pi/2, and 101 indicates the 1 matrix mirrored about the vertical.