1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00

Remove unused ScreenshotDumpPNG32bpp function (#22590)

This commit is contained in:
Aaron van Geffen
2024-08-19 18:35:53 +02:00
committed by GitHub
parent 14e247caad
commit e8cff5d75f
2 changed files with 0 additions and 31 deletions

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;

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);