LazyFix tool

LazyFix Tool is a tool that fixes the so-called "lazily-made masks" i. e. the mask is the same as the sprite. Lazily-made masks give issues to PGE, since the algorithm used by it doesn't render properly this kind of mask.

Alpha-channel masks
A mask is an Alpha-channel coding image. Each Pixel of the mask defining the level of opacity of the same pixel on the source image: Each Pixel of a mask - is a value of opacity for each pixel of the source image:

How it works
Because the lazily-made image is a copy of source image, we must compare all pixels between image and mask.

If pixels are equal - fill pixel on the mask by black color.

These operations made the right mask from broken.

How to use
LazyFix tool - is a console tool, you need open the terminal or command line and change directory to the LazyFix tool.

This utility fixes all SMBX64 graphics (GIF with mask images) in an selected folder and (optionally) all graphics inside the subfolders.

The mask must be placed WITH its image, as the fixing process is based on calculating broken pixels by comparing between the pixels of both images.

For fixing graphics which are in one folder:

For fixing graphics of an whole episode, you need use the "-W" switch:

Also you can fixi gray-colored mask which created for use semi-transparent effects. This command make the gray down of the gray-scaled masks:

Note: After work of tool will be created the "_backup" directory where will be placed broken images before run fixing. If tool made errors aftrer it's worls, you can always restore your old images from backup directory.

You can run fixing without creation of backup directories, if you will apply "-N" switch, but you will can't fix your old images, and you need draw mask manually:

Usage of the LazyFix tool for single images
Also you can simply drag image files into LazyFix application file like into folder, and it will run fix of those images.

Example for Windows

Example for Linux / Mac OS X

Usage of LazyFix tool with GUI
The Editor have a GUI shell for set properties to the lazyFix tool.

For open them, try the menu item: " Tools -> External tools -> Fix Lazily-made graphics (LazyFix tool) "

And you can configure properties for setup the batch fixing. When you press "Start", will be opened the "Development Console" window, where you will see the fixing process.

Links

 * LazyFix Tool Manual
 * Download latest LazyFix tool