summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorK. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>2022-06-23 20:55:37 -0700
committerK. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>2022-06-23 21:10:59 -0700
commit42f7f0894ed4884a0360ca583c955359e1c90e87 (patch)
treea8ab02ab3b198dfe2911198fbc087dada1e0c5b3 /core
parentecf187705eb59632cefa649b0f4b44dd3569c0fb (diff)
Restore the openexr grayscale property.
Diffstat (limited to 'core')
-rw-r--r--core/io/image.cpp4
-rw-r--r--core/io/image.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/core/io/image.cpp b/core/io/image.cpp
index 97a46c29db..f065dac212 100644
--- a/core/io/image.cpp
+++ b/core/io/image.cpp
@@ -2324,11 +2324,11 @@ Error Image::save_exr(const String &p_path, bool p_grayscale) const {
return save_exr_func(p_path, Ref<Image>((Image *)this), p_grayscale);
}
-Vector<uint8_t> Image::save_exr_to_buffer() const {
+Vector<uint8_t> Image::save_exr_to_buffer(bool p_grayscale) const {
if (save_exr_buffer_func == nullptr) {
return Vector<uint8_t>();
}
- return save_exr_buffer_func(Ref<Image>((Image *)this), false);
+ return save_exr_buffer_func(Ref<Image>((Image *)this), p_grayscale);
}
Error Image::save_webp(const String &p_path, const bool p_lossy, const float p_quality) const {
diff --git a/core/io/image.h b/core/io/image.h
index 10c1156dae..2cad26f3e9 100644
--- a/core/io/image.h
+++ b/core/io/image.h
@@ -294,7 +294,7 @@ public:
Error save_jpg(const String &p_path, float p_quality = 0.75) const;
Vector<uint8_t> save_png_to_buffer() const;
Vector<uint8_t> save_jpg_to_buffer(float p_quality = 0.75) const;
- Vector<uint8_t> save_exr_to_buffer() const;
+ Vector<uint8_t> save_exr_to_buffer(bool p_grayscale) const;
Error save_exr(const String &p_path, bool p_grayscale) const;
Error save_webp(const String &p_path, const bool p_lossy = false, const float p_quality = 0.75f) const;
Vector<uint8_t> save_webp_to_buffer(const bool p_lossy = false, const float p_quality = 0.75f) const;