ID:2428099
 
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
Hello!

Wonderful system you have, great to see it still going. I've just gotten into the back end of it after doing some optimisations for one of the SS13 servers for my own amusement.

One thing of interest that would help a great deal would be the ability to tell Dream Maker to save a .DMI after processing the image with an external program.

The main purpose being that one of the major optimisations I've run is on the PNG sprite sheets used.

While I've been doing the optimisations myself, I'm putting it together into a script that uses some programs to optimise the way the PNG data is stored (without affecting the .DMI zTXt metadata chunk) that I can then pass on to other users.

However, any time a person opens a .DMI in Dream Maker and then saves it, it is, understandably, re-saved using whichever PNG library is built in. This can be problematic with large numbers of people handling resources bases for games with the file sizes varying wildly if someone accidentally (or even deliberately) re-saves a DMI in Dream Maker.

What I'm asking is if there is the possibility of adding an advanced option to 'Save DMI using '. In this case it would need to be patched into the DMI 'save' code so that a user could enter an arbitrary command to execute a third party application (assumably in the same folder as dreammaker.exe/etc) on the PNG data -before- the DMI metadata is applied to the file and saved as a DMI - I suggest the step being before metadata writing because many optimisers will strip metadata blindly unless you use more advanced command arguments, so I'd prefer to make it less complex and more openly available to 'any user'.

This would be along the lines of (what I assume is done) with the addition:

-> Editing DMI
-> Save DMI
-> is passed to libpng (I assume) for compression / file writing
==-> Execute on
-> DMI metadata is added as zTXt chunk to file and saved as .DMI

This could give advanced users / sprite makers the ability to have their files optimised further within the Dream Maker workflow without having to resort to running an outside optimisation pass on every image / update before it's packaged.

I won't suggest image comparison checks from the input to output (as I'm doing myself) as that, while automated, would require significantly more code etc than just providing the option to advanced users and leaving them with 'If you break your image with your external command that's not Dream Maker's fault'. Also not suggesting anything about bulk / batch handling of resources either, just a 'save this one dmi' level.

Thanks!