Frequency-selective subwavelength-size nanophotonic devices for snapshot spectral imaging