To install the Pixi mod, copy `Pixi.dll` (from the latest release) into the `Plugins` folder in Gamecraft's main folder.
You'll also need [GamecraftModdingAPI](https://git.exmods.org/modtainers/GamecraftModdingAPI) installed and Gamecraft patched with [GCIPA](https://git.exmods.org/modtainers/GCIPA/releases).
execute the command `PixiScale 1920 1080` to set the size and then `Pixi2D "pixel_art.png"` to load the image.
### Behaviour
Pixi takes an image file and converts every pixel to a coloured block.
Unfortunately, an image file supports over 6 million colours and Gamecraft only has 100 paint colours (and only 90 are used by Pixi).
Pixi uses an algorithm to convert each pixel an image into the closest paint colour, but colour accuracy will never be as good as a regular image.
Pixi's colour-conversion algorithm also uses pixel transparency to you can cut out shapes.
A pixel which has opacity of less than 75% will be not be converted into a solid block.
A pixel which has an opacity between 75% and 50% will be converted into a glass cube.
A pixel which has an opacity greater than 75% will be converted into an aluminium cube.
This only works with `.PNG` image files since the `.JPG` format doesn't store transparency.
Pixi also groups blocks together, since images have a lot of pixels.
After the colour-conversion algorithm, Pixi groups blocks in the same column with the same paint colour together.
The grouping algorithm reduces the block count by over 75% in ideal cases, and it can reduce the block count by 50% in most cases.
Imagine a standard 1080p screen (1920x1080 pixels), which has more than 2 million pixels.
Pixi could import that image with less than 500K blocks, which will still hurt Gamecraft's performance even on good PCs but it won't make it completely unusable like 2M blocks will.
## Suggestions and Bugs
If you find a bug or have an idea for an improvement to Pixi, please create an [issue](https://git.exmods.org/NGnius/Pixi/issues) with an in-depth description.
If you'd like to discuss your issue instead, talk to NGnius on the [Exmods Discord server](https://discord.gg/xjnFxQV).
You can make sure Pixi can find all `.dll` files it needs by copying your Gamecraft folder here and renaming it to `ref`, but you'll have to re-copy it after every Gamecraft update.
To avoid that, create a symbolic link (look it up) to your Gamecraft install folder named `ref` in this folder instead.
Like most mods, you will have to patch your game with [GCIPA](https://git.exmods.org/modtainers/GCIPA).
Pixi also requires the [GamecraftModdingAPI](https://git.exmods.org/modtainers/GamecraftModdingAPI) library to be installed (in `ref/Plugins/GamecraftModdingAPI.dll`).