We got the PNG files, thanks. You can see the savePNG
function in the script:
function savePNG (file) {
var options = new PNGSaveOptions();
options.compression = 6;
activeDocument.saveAs(file, options, true, Extension.LOWERCASE);
}
This is supposed to be roughly equal to "save as, PNG". That Photoshop adds a ton of XML is terrible, but it's a Photoshop problem with this kind of saving, so there's nothing we can do to avoid it.
We could do a different kind of saving. We used to actually, then we changed it to "save as" but I don't remember the reasons why. If you want to use "save for web" instead, change the function to this:
function savePNG (file) {
var options = new ExportOptionsSaveForWeb();
options.format = SaveDocumentType.PNG;
options.PNG8 = false;
options.transparency = true;
options.interlaced = false;
options.includeProfile = false;
activeDocument.exportDocument(file, ExportType.SAVEFORWEB, options);
}
However, why is this important to fix? Spine reads your image files and ignores the Photoshop XML junk. When Spine packs a texture atlas, the PNGs it creates don't have such junk.
I suggest using Oxipng if you care about PNG file sizes. No software, even Spine, is going to write the smallest PNGs possible. We may integrate Oxipng in the future, so Spine exports can use it. See here:
Exported PNG file size too big using script
Actually looking in the script's Git history, it was "save as" since the first commit. I've updated to the script to use "save for web", let's see how that goes!