Alternative photoinduced release of HNO or NO from an acyl nitroso compound, depending on environmental polarity.