A Python application can help you create the frames based on input and output images
- Load input and output images
- Choose input and output colors
- Choose frames by using a slider (Maximum: 500)
- Generate frames of your gradient
- Frame Extractor: It's useful if you don't want to extract frames of 1 sprite sheet image manually with your photo editor/paint tools
- Resize Image: It's useful if you want to resize a very small image or sprite sheet without blur
You need to install Pillow:
pip install pillowYou have 2 methods to use this application:
- Download from Releases
- Clone repository:
git clone https://github.com/WMZS-Modding/gradient-frame-generator.gitAnd then run:
python main.py- Open the application
- Choose
Frame Extractorsection - Choose your sprite sheet image
- Edit the
Frame HeightandFrame Width - Click
EXTRACT FRAMESbutton - Go to
save/frames_<number>/and copy these frame images
- Open the application
- Choose
Frame Extractorsection - Choose
Folder Batchsection - Click
Browse Folderbutton to choose your folder of sprite sheets - Click
EXTRACT FRAMESbutton - Go to
save/frames_<number>/and copy these frame images
- Open the application
- Choose your input and output images (they must be the same)
- Choose your colors to your gradient
- Choose your frames you want
- Click
START GENERATIONbutton - Go to
save/gradient_frame_<number>/and copy these gradient frame images
- Open the application
- Tick
Auto mode - Choose your input and output images (they must be the same)
- Choose your frames you want
- Click
START GENERATIONbutton - Go to
save/gradient_frame_<number>/and copy these gradient frame images
- Open the application
- Choose
Resize Imagesection - Import your image or sprite sheet
- Write your new size you want
- Choose
Resizebutton (If you want to resize image without blur, choose "Pixel" button. If you still prefer original method, just choose "Original" button)
- Open the application
- Choose
Filesection - Choose
Change output naming - Write your custom file and folder names
- Advantages: Gives you the correct result. It can handle both two identical input colors in image 1 and two different output colors in image 2
- Disadvantages: Still wastes your time because you must add colors manually. And it maybe make a mistake if you don't add missing colors
- Advantages: Gives you the same result as manual mode. It can still handle both two identical input colors in image 1 and two different output colors in image 2. The only different is it doesn't requires adding colors manually
- Disadvantages: Difficult to control because it scans both images simultaneously
- Advantages: Can extract accurately frame sizes by entering width and height
- Disadvantages: For single image only, still waste your time
- Advantages: Extremely fast. It can handle your folder of sprite sheets no matter they have different frame sizes
- Disadvantages: Sometimes it can output frames with incorrect original dimensions for sprite sheets with different frame sizes. I recommend separating folders that has different sprite sheets with different frame sizes, it's even faster than handling the whole them
If you don't want 500 frames limit, you can follow these step to change limit:
- Fork this repository
- Go to
main.py - Change this code:
self.frame_slider = ttk.Scale(slider_frame, from_=2, to=500, variable=self.frame_count_var, orient=tk.HORIZONTAL, length=300, command=lambda v: self.frame_count_var.set(int(float(v))))Warning: Only change to=500, don't set it to to=2 and change from_=2 or they'll cause errors
- Push your change to your forked repository and then run
release_assets.yml