Remove unused ScreenshotDumpPNG32bpp function (#22590)

This commit is contained in:
Aaron van Geffen authored and GitHub committed 2024-08-19 16:35:53 +00:00
1 parent 14e247caad
commit e8cff5d75f
2 files changed
-31

No files matched your search

-30
View File
@@ -190,36 +190,6 @@ std::string ScreenshotDumpPNG(DrawPixelInfo& dpi)
return "";
}
std::string ScreenshotDumpPNG32bpp(int32_t width, int32_t height, const void* pixels)
{
auto path = ScreenshotGetNextPath();
if (!path.has_value())
{
return "";
}
const auto pixels8 = static_cast<const uint8_t*>(pixels);
const auto pixelsLen = width * 4 * height;
try
{
Image image;
image.Width = width;
image.Height = height;
image.Depth = 32;
image.Stride = width * 4;
image.Pixels = std::vector<uint8_t>(pixels8, pixels8 + pixelsLen);
Imaging::WriteToFile(path.value(), image, IMAGE_FORMAT::PNG_32);
return path.value();
}
catch (const std::exception& e)
{
LOG_ERROR("Unable to save screenshot: %s", e.what());
return "";
}
}
static int32_t GetHighestBaseClearanceZ(const CoordsXY& location, const bool useViewClipping)
{
int32_t z = 0;
-1
View File
@@ -54,7 +54,6 @@ struct CaptureOptions
void ScreenshotCheck();
std::string ScreenshotDump();
std::string ScreenshotDumpPNG(DrawPixelInfo& dpi);
std::string ScreenshotDumpPNG32bpp(int32_t width, int32_t height, const void* pixels);
void ScreenshotGiant();
int32_t CommandLineForScreenshot(const char** argv, int32_t argc, ScreenshotOptions* options);