Add compression option for texture dumps.

Enable through command line options:
-C Graphics.Settings.TexturePNGCompressionLevel=[0-9]

Or from GFX.ini:
[Settings]
TexturePNGCompressionLevel=[0-9]

@see #10792
This commit is contained in:
joon
2023-02-09 09:49:25 -05:00
parent 6743ca8e09
commit db712772b7
5 changed files with 7 additions and 4 deletions

View File

@ -38,7 +38,7 @@ public:
MathUtil::Rectangle<int> GetRect() const { return m_config.GetRect(); }
MathUtil::Rectangle<int> GetMipRect(u32 level) const { return m_config.GetMipRect(level); }
bool IsMultisampled() const { return m_config.IsMultisampled(); }
bool Save(const std::string& filename, unsigned int level);
bool Save(const std::string& filename, unsigned int level, int compression = 6);
static bool IsCompressedFormat(AbstractTextureFormat format);
static bool IsDepthFormat(AbstractTextureFormat format);