There has been an old issue with the image creation workflow in blender, made more apparent now that texture tools are getting more attention. The problem is that generated images can easily get lost on various occasions.
* User exits blender without saving them
* Trying to save all dirty images will skip generated images
* Changing the generated image type to float or the color management (CM) space will delete all contents of the image.
* Undoing after baking
There are various ways to deal with those issues:
* Have a preference for autosaving dirty images when closing blender. Alternative of having a pop-up prompt makes the exit popup complicated and only supported on Windows/Mac.
* Saving dirty images operator creates an image file for all generated images.
* Saving can be done immediately on generation so reloading the file on CM change will reload the file correctly. We are forfeiting format change (float/byte) at a later time this way but I feel this is not such a big deal, this choice should usually be done early on. It might make sense to only treat blank type generated images this way.
* Pack images immediately on generation. This will only work with byte images, since only those allow packing as pngs. We might allow packing in memory in exr format too by using a temporary exr file to save to before packing (unpacking will be problematic later though).
All those require having a default place to store generated images in.
* Have a preference for a directory that handles generated texture storage (this could be the Textures directory, but it's possible that there will be too many name collisions and file pollution)
* Texture directory can always resides in a directory beside the project file. This will of course require the user to save the file first. If file is not saved, file storage can be done on tmp. Downside is that if user saves blend file after images have been saved, the tmp files could get wiped out. Alternatively, file storage could be done on Textures directory (with name collision issue/file pollution, mentioned above)