Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI scanning to reject alpha PNG images (#69)
Add a Python script to the repo which recursively scans for `*.png` files and checks each one for the presence of an alpha channel. If any are discovered, they'll be reported and the program exit status incremented (reporting an error condition to the calling shell). The script uses Python Pillow to quickly examine each PNG file encountered during its scan. A GitHub Actions workflow sets up Python 3.13 and Pillow on a ubuntu runner, then runs the scanning script. The script will output GitHub Actions annotated strings, which the workflow will turn into file annotations visible on the workflow summary page. (The annotations are not as useful on image files as they would be on text content, but they'll serve.) Scanning of this sort in general is more likely to be useful if wrong-format images are submitted via PR, where they can be blocked from ever reaching the main branch until they've been converted to the correct format. If the images are directly committed to the repo by maintainers, scanning them and flagging issues after-the-fact will be far less effective.
- Loading branch information