Grayscale image Compression and Encryption Based on Format Conversion