Develop a simple image encryption tool using pixel manipulation. The program should allow users to encrypt and decrypt images by modifying pixel values through operations like swapping pixel values or applying basic mathematical transformations to each pixel.
β
Encrypts images by altering pixel values.
β
Decrypts images back to their original form.
β
Uses pixel swapping and mathematical operations for encryption.
β
Ensures image security through pixel-level transformations.
Ensure you have Python installed along with the required dependencies. Install the necessary libraries using:
pip install pillow numpyπΉ Loads the input image and converts it into a NumPy array.
πΉ Generates a random key of the same dimensions as the image.
πΉ Uses bitwise XOR (np.bitwise_xor) for encryption and decryption.
πΉ Saves the encrypted and decrypted images.
This project demonstrates a basic image encryption technique using NumPy and PIL. While it offers a simple way to secure images, it lacks advanced security measures required for real-world applications. For enhanced security, integrating robust cryptographic algorithms like AES or RSA is recommended. π