The paper designs an image security system. It includes four parts: keys generation, permutation, diffusion and decryption. Using six decimal numbers as the key, it can get three new keys: key1, key2 and key3 from the origin key in keys generation. The permutation used a new chaotic map to shuffles the image pixels by key1 and key2. The diffusion used the logistic map to flat the histogram of the ciphered image. The key3 is the parameters of the logistic map. The results of simulation show the validity of security system. Analysis shows that it can be used in real-time image encryption applications with high speed.