diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2013-11-15 10:22:11 +0100 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2013-11-15 10:22:49 +0100 |
commit | 81b940cc25e6892ac752005521b3adba4534177b (patch) | |
tree | b4c3426e65accc52fec6ff0dcbbbe1e52f944493 /src/common/image.h | |
parent | be3d92ba03d832427f0720106dd72a9852639cb6 (diff) | |
download | colobot-81b940cc25e6892ac752005521b3adba4534177b.tar.gz colobot-81b940cc25e6892ac752005521b3adba4534177b.tar.bz2 colobot-81b940cc25e6892ac752005521b3adba4534177b.zip |
Fix for crash when loading PNG in indexed mode
For example, some icons in SatCom
Diffstat (limited to 'src/common/image.h')
-rw-r--r-- | src/common/image.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/image.h b/src/common/image.h index 44aedf1..31dab2d 100644 --- a/src/common/image.h +++ b/src/common/image.h @@ -97,6 +97,9 @@ public: //! Pads the image to nearest power of 2 dimensions void PadToNearestPowerOfTwo(); + //! Convert the image to RGBA surface + void ConvertToRGBA(); + //! Loads an image from the specified file bool Load(const std::string &fileName); @@ -107,6 +110,9 @@ public: std::string GetError(); private: + //! Blit to new RGBA surface with given size + void BlitToNewRGBASurface(int width, int height); + //! Last encountered error std::string m_error; //! Image data |