diff options
| author | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
| commit | 39ed87570bdb2f86969d4be821c94b722dc71179 (patch) | |
| tree | abc53757f75f40c80278e87650ea92808274aa59 /mp/src/public/bitmap/tgawriter.h | |
| download | source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip | |
First version of the SOurce SDK 2013
Diffstat (limited to 'mp/src/public/bitmap/tgawriter.h')
| -rw-r--r-- | mp/src/public/bitmap/tgawriter.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/mp/src/public/bitmap/tgawriter.h b/mp/src/public/bitmap/tgawriter.h new file mode 100644 index 00000000..45359f88 --- /dev/null +++ b/mp/src/public/bitmap/tgawriter.h @@ -0,0 +1,40 @@ +//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//===========================================================================//
+
+#ifndef TGAWRITER_H
+#define TGAWRITER_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+#include "tier1/interface.h"
+#include "bitmap/imageformat.h" //ImageFormat enum definition
+
+class CUtlBuffer;
+
+
+namespace TGAWriter
+{
+
+ bool WriteToBuffer( unsigned char *pImageData, CUtlBuffer &buffer, int width, int height,
+ ImageFormat srcFormat, ImageFormat dstFormat );
+
+
+ // write out a simple tga file from a memory buffer.
+ bool WriteTGAFile( const char *fileName, int width, int height, enum ImageFormat srcFormat, uint8 const *srcData, int nStride );
+
+// A pair of routines for writing to files without allocating any memory in the TGA writer
+// Useful for very large files such as posters, which are rendered as sub-rects anyway
+ bool WriteDummyFileNoAlloc( const char *fileName, int width, int height, ImageFormat dstFormat );
+ bool WriteRectNoAlloc( unsigned char *pImageData, const char *fileName, int nXOrigin, int nYOrigin, int width, int height, int nStride, ImageFormat srcFormat );
+
+
+} // end namespace TGAWriter
+
+#endif // TGAWRITER_H
|