Jump to content

2 Screenshots

About This File

Building my own theme... I figured maybe someone else would find value in some free Python scripts :) Maybe I'll share the theme when I'm done.

Tired of batching with photoshop? This script will shrink any number of images within a file to constrain the width and/or height to beneath a specific size (default is under 200px wide and/or 100px tall. Then, it will attach it to a background image, which can be anything you want. The default tile included is is Chicuelo's theme. Super easy and FAST! 


What's New in Version 2.0.0

Released

Update: Even though the scripts seem simple enough, I decided to make them easier for the masses to use. I broke apart the files to separate the processes, and renamed them so they should be listed first in the folder.

To use:

If you have python 3 installed already: 
Just install the dependencies, drop the .py files in any directory full of images, then doubleclick the files in the order below:

_1_shrink.py will shrink the width and/or height under the specified dimensions while maintaining the aspect ratio. Variables can easily be adjusted within the script.
_2_combine.py will open your _Background.png and attach and center each image within the folder, and overwrite the existing image with the new background.
_3_width_75percent.py shrinks the width of each file in the directory for widescreen displays.

To install Python:
1. Install python 3 - https://www.python.org/downloads/ (Make sure to click the checkbox to add path in environment variables when installing)
2. Install PIP if it's not installed along with PYTHON (I can't remember if it does)
    - Download get-pip.py to a folder on your computer - https://bootstrap.pypa.io/get-pip.py
    - Open a command prompt and navigate to the folder containing get-pip.py.
    - Run the following command: python get-pip.py
    - Pip is now installed!
3. Install PIL and python-resize-image
    - Run these commands in your command prompt:
    - pip install pillow
    - pip install python-resize-image

4. Follow steps above.

Notes:
1. BACK UP YOUR ARTWORK BEFORE RUNNING SCRIPT. IT WILL REPLACE ALL IMAGES IN WHATEVER FILE IT IS RAN FROM.
2. Change _Background.png to whatever wheel art you want, it should work. 
3. The _1_shrink.py script will change all art to less than 200px width and/or 100px height by default. That can be altered to any custom size from within the script.
4. I wrote this script in quick fashion to update my MAME wheel and figured I'd share. It works fine for me, but I'm not responsible for anything that goes wrong.
5. Written on Windows, but probably would work on Linux.

  • Like 2
  • Super Like 1



User Feedback

Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×