We present an algorithm which is closely related to direct phase retrieval methods that have been shown to work well empirically [1], [2] and prove that it is guaranteed to recover (up to a global phase) a large class of compactly supported smooth functions from their spectrogram measurements. As a result, we take a first step toward developing a new class of practical phaseless imaging algorithms capable of producing provably accurate images of a given sample after it is masked by just a few shifts of a fixed periodic grating.