Imaging of photonic nanopatterns by scanning near-field optical microscopy