Repository navigation
IconProcessor
FireController#1847 edited this page Aug 28, 2025
·
1 revision
The IconProcessor utility is designed to unify the process of making picture icons in the same style as the PictureProcessor, so they can be done in the same place at the same time.
The IconProcessor is an extremely simple application and only has one functionality. The structure of the command is as follows:
Description:
A utility for processing icons for Factorio mods.
Usage:
IconProcessor <texture> [options]
Arguments:
<texture> The base texture file to be converted into an icon set.
Options:
-?, -h, --help Show help and usage information
--version Show version information\Example usage is as follows:
.\IconProcessor ./WoodenFence/wooden-fence-icon.pngFor the following example, our directory structure will look as follows:
Graphics/
IconProcessor.exe
WoodenFence/
wooden-fence-icon.pngWe could assume we have the following 3D model export, which would represent the wooden-fence-icon.png:
To use the command, we would execute it as follows:
.\IconProcessor ./WoodenFence/wooden-fence-icon.pngThe output of our command will appear as follows:
Loaded image: [fullpath]\Graphics\WoodenFence\wooden-fence-icon.png (2048x2048)
Trimmed whitespace, cropped image to: 880x810
Warning: The trimmed image is not square (difference: 70px). The icon may not appear as expected.
Resized image to: 60x60 with padding 2
Generated icon layer: 64x64 at position 2,2
Resized image to: 28x28 with padding 2
Generated icon layer: 32x32 at position 66,2
Resized image to: 12x12 with padding 2
Generated icon layer: 16x16 at position 98,2
Resized image to: 4x4 with padding 2
Generated icon layer: 8x8 at position 114,2And the icon file will be written to disk:
wooden-fence-icon-processed.png
This file can be used directly in a Factorio mod, like so:
{
type = "wall",
name = "wooden-fence",
icon = "__ourmod__/wooden-fence-icon.png",
}