diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-01-28 15:33:56 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2019-01-28 16:00:15 +0100 |
commit | cc0842f9a6b0fda07ca0b8ad483e225b492428c7 (patch) | |
tree | aff98a8d89c2507f4efab34fe537a82f986adad7 /core/image.h | |
parent | 89e7c2cb13c6f06eb376aae5e9354f4fabf01f3e (diff) |
Prevent upscaled SVG from exceeding Image bounds
Also expose Image MAX_WIDTH and MAX_HEIGHT.
Fixes #24455.
Diffstat (limited to 'core/image.h')
-rw-r--r-- | core/image.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/image.h b/core/image.h index 3604580e98..b23f8cac46 100644 --- a/core/image.h +++ b/core/image.h @@ -52,14 +52,14 @@ typedef Ref<Image> (*ImageMemLoadFunc)(const uint8_t *p_png, int p_size); class Image : public Resource { GDCLASS(Image, Resource); +public: + static SavePNGFunc save_png_func; + enum { MAX_WIDTH = 16384, // force a limit somehow MAX_HEIGHT = 16384 // force a limit somehow }; -public: - static SavePNGFunc save_png_func; - enum Format { FORMAT_L8, //luminance |