The current algorithm of encrypting images uses low-dimensional chaotic systems with a limited key space and poor security, while high-dimensional chaotic systems are difficult to implement and inefficient. Additionally, if image encryption algorithms use fixed DNA encoding rules, they could be cracked; dynamic coding can easily deviate from optimal solutions, thus causing algorithm instability. Based on this, a novel technique for image encryption is presented in this article. It is possible to avoid linear correlation of the chaotic sequence by randomly jumping on two uncorrelated one-dimensional chaoses. Meanwhile, numerous encryption results are generated in parallel by randomly grouping DNA encoding groups and encoding operations, and the optimal solution is then selected based on the encryption results, thereby minimizing ciphertext image instability to some extent. According to the experimental results, this algorithm produces high-security, plaintext-sensitive, and non-cracking encrypted images. Furthermore, this algorithm produces excellent encryption results both on color and sized images, and is applicable to a wide variety of applications.