
Convert RGB to CMYK in Python
Posted 26th March 2021
1 comment
Efficient Python code for taking a RGB image and converting it to CMYK before splitting the relevant channels out.

Structural Similarity Index (SSIM) in Python
Posted 19th February 2021
No comments
Quantitatively check the quality of a compressed image using a simple Python code for calculating the Structural Similarity Index (SSIM) and Mean Square Errors (MSE) between two images.

Peak Signal-to-Noise Ratio (PSNR) in Python
Posted 12th February 2021
No comments
Quantitatively check the quality of a compressed image using a simple Python code for calculating the Peak Signal-to-Noise Ratio (PSNR) between two images.

Reading EXIF data in Python
Posted 2nd February 2021
2 comments
In order to review the properties of various common-format image files, I wrote a command-prompt script in Python that will display EXIF data and other properties of JPG, PNG, TIF, CR2 and NEF files.

Query a PostgreSQL database via Python
Posted 11th December 2020
No comments
Use this simple template script created in Python to connect to your PostgreSQL database and run a query.

Selectively rotating images in Python recursively
Posted 3rd December 2020
No comments
Use OpenCV in Python to recurse through directories and rotate selected images based on a string in their file name.

Iterate both i and j in Python
Posted 2nd September 2020
No comments
Two methods for implimenting nested iterations of i and j in Python.

SQL to CSV via Python, with Headers
Posted 7th June 2019
1 comment
Nifty Python code that converts a SQL database file into a CSV file and includes column headers.

Larger matplotlib images in Jupyter Notebook
Posted 21st February 2019
No comments
Simple code to enable matplotlib to generate larger inline images in Jupyter Notebook.