First off, check if Preview.png already exists. If so, don't bother with the rest of this.
Regex this part in the Index.ini file to get the path to the IconFile:
IconFile = ContentFile\n<whitespace>Path = (.*)\n
Note: IconFiles can be any size, they don't even have to be rectangular!
Get the color of the top-left pixel in the image and use that color to fill the left and right sides.
Assuming you have a 23x23 px one, it could be scaled by a factor of 9 in the width and height to get a 207x207 image.
By then making the canvas the width of the image * 16 / 9, the new width of the canvas becomes 368x207. This is a perfect 16:9 ratio, which is what mod.io recommends.
Now fill in the left and right sides with the color gotten before and save the image as Preview.png to the converted mod's folder.
First off, check if
Preview.png
already exists. If so, don't bother with the rest of this.Regex this part in the Index.ini file to get the path to the IconFile:
IconFile = ContentFile\n<whitespace>Path = (.*)\n
Note: IconFiles can be any size, they don't even have to be rectangular!
Preview.png
to the converted mod's folder.