From 16593e0a04e7fdad9ca9222a04d8bd8165169cf7 Mon Sep 17 00:00:00 2001 From: DarkWyrm Date: Sat, 5 Jul 2003 16:48:04 +0000 Subject: [PATCH] Tweaks to make screenshots work right. They work *perfectly* on Ctrl+Break. :) git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3861 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/server/PNGDump.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/servers/app/server/PNGDump.cpp b/src/servers/app/server/PNGDump.cpp index fa25683f71..fd633bf2a7 100644 --- a/src/servers/app/server/PNGDump.cpp +++ b/src/servers/app/server/PNGDump.cpp @@ -6,7 +6,7 @@ #include #include "PNGDump.h" -//#define DEBUG_PNGDUMP +#define DEBUG_PNGDUMP void SaveToPNG(const char *filename, const BRect &bounds, color_space space, const void *bits, const int32 &bitslength, const int32 bytesperrow) @@ -64,7 +64,9 @@ printf("Couldn't set jump\n"); png_set_compression_level(png_ptr,Z_NO_COMPRESSION); - png_set_IHDR(png_ptr, info_ptr, bounds.IntegerWidth(), bounds.IntegerHeight(), 8, PNG_COLOR_TYPE_RGB, + png_set_bgr(png_ptr); + + png_set_IHDR(png_ptr, info_ptr, bounds.IntegerWidth(), bounds.IntegerHeight(), 8, PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); png_write_info(png_ptr, info_ptr);