Anodizing with voltage versus optical path length modulation: a new tool for the preparation of photonic structures