In this paper, we propose an improved image encryption algorithm based on double random phase encoding (DRPE). Our contribution is the design of a new algorithm which uses Discrete Cosine Transform (DCT) to replace Discrete Fourier Transform (DFT) so as to avoid operations on complex numbers. Thus, we use a logistic map to generate random matrices instead of random phase masks in the traditional DRPE so as to decrease the number of secret key. We tested the algorithm using five types of attacks, the results indicate that the improved algorithm overcomes weaknesses of traditional scrambling methods, it has shown strong resilience against statistical attacks. The advantage of this algorithm is that it is convenient to verify whether the encrypted images have been tampered.