We propose a new method to encrypt and decrypt a two-dimensional amplitude image, which uses a jigsaw transform and a localized fractional Fourier transform. The jigsaw transform is applied to the original image to be encrypted, and the image is then divided into independent nonoverlapping segments. Each image segment is encrypted using different fractional parameters and two statistically independent random phase codes. The random phase codes, along with the set of fractional orders and jigsaw transform index, form the key to the encrypted data. Results of computer simulation are presented to verify the proposed idea and analyze the performance of the method. We also propose an optical implementation, which may find application for encrypting data stored in holographic memory.