From db712772b7e8685c230499a120a6bd2835f874e1 Mon Sep 17 00:00:00 2001 From: joon <126473+dvessel@users.noreply.github.com> Date: Thu, 9 Feb 2023 09:49:25 -0500 Subject: 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 --- Source/Core/VideoCommon/AbstractTexture.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoCommon/AbstractTexture.cpp') diff --git a/Source/Core/VideoCommon/AbstractTexture.cpp b/Source/Core/VideoCommon/AbstractTexture.cpp index 03b83b21cc..aa0968c3f8 100644 --- a/Source/Core/VideoCommon/AbstractTexture.cpp +++ b/Source/Core/VideoCommon/AbstractTexture.cpp @@ -19,7 +19,7 @@ void AbstractTexture::FinishedRendering() { } -bool AbstractTexture::Save(const std::string& filename, unsigned int level) +bool AbstractTexture::Save(const std::string& filename, unsigned int level, int compression) { // We can't dump compressed textures currently (it would mean drawing them to a RGBA8 // framebuffer, and saving that). TextureCache does not call Save for custom textures @@ -51,7 +51,7 @@ bool AbstractTexture::Save(const std::string& filename, unsigned int level) return Common::SavePNG(filename, reinterpret_cast(readback_texture->GetMappedPointer()), Common::ImageByteFormat::RGBA, level_width, level_height, - static_cast(readback_texture->GetMappedStride())); + static_cast(readback_texture->GetMappedStride()), compression); } bool AbstractTexture::IsCompressedFormat(AbstractTextureFormat format) -- cgit v1.2.3