Description
Tested versions
4.4
System information
Windows 11 - Godot 4.4
MacOS 15.3.1 - Godot 4.4
Issue description
When running the Method save_jpg
on the class Image, the Method will fail to save to a directory if it does not already exist on the disk.
This may be expected behaviour - however - The Error in the Output Log is very unspecific, reporting only:
ERROR: Can't save JPG at path: 'res://PATH/example/...
Would it be possible to either get the method to generate the required sub-folders needed, to save to any arbitrary path, or, get the ERROR message updated to be more descriptive as to why the JPG failed to save.
(PS - it's assumed that the same happens with the other image export types, but I have not tested these myself).
Relevent Documentation page:
https://docs.godotengine.org/en/stable/classes/class_image.html#class-image-method-save-jpg
Steps to reproduce
- Use the Method
save_jpg
to save an image. - Input a path for the image to be save to, at some sub-folder that does not yet exist.
- Observe the ERROR.
Minimal reproduction project (MRP)
N/A