diff --git a/src/servers/app/PNGDump.cpp b/src/servers/app/PNGDump.cpp index 800fe6acf4..7745cfdb4a 100644 --- a/src/servers/app/PNGDump.cpp +++ b/src/servers/app/PNGDump.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2005, Haiku. + * Copyright 2001-2006, Haiku. * Distributed under the terms of the MIT License. * * Authors: @@ -11,17 +11,16 @@ #include "PNGDump.h" +#include +#include + +#include + #include #include #include #include -#include - -#include -#include - -#include "frame_buffer_support.h" #define TRACE_PNGDUMP #ifdef TRACE_PNGDUMP @@ -30,6 +29,7 @@ # define TRACE(x) ; #endif + status_t SaveToPNG(const char* filename, const BRect& bounds, color_space space, const void* bits, int32 bitsLength, int32 bytesPerRow) @@ -113,5 +113,13 @@ SaveToPNG(const char* filename, const BRect& bounds, color_space space, png_destroy_write_struct(&png, NULL); fclose(file); + + // Set the file type manually, so that it doesn't have to be + // picked up by the registrar or Tracker, first + BNode node(filename); + BNodeInfo nodeInfo(&node); + if (nodeInfo.InitCheck() == B_OK) + nodeInfo.SetType("image/png"); + return B_OK; }