Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.4 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //===========================================================================//
  7. #ifndef TGAWRITER_H
  8. #define TGAWRITER_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "tier1/interface.h"
  13. #include "bitmap/imageformat.h" //ImageFormat enum definition
  14. class CUtlBuffer;
  15. namespace TGAWriter
  16. {
  17. bool WriteToBuffer( unsigned char *pImageData, CUtlBuffer &buffer, int width, int height, ImageFormat srcFormat, ImageFormat dstFormat );
  18. // Write out a simple tga file from a memory buffer.
  19. bool WriteTGAFile( const char *fileName, int width, int height, enum ImageFormat srcFormat, uint8 const *srcData, int nStride );
  20. // Routines for writing to files without allocating any memory in the TGA writer
  21. // Useful for very large files such as posters, which are rendered as sub-rects
  22. bool WriteDummyFileNoAlloc( const char *fileName, int width, int height, ImageFormat dstFormat );
  23. bool WriteRectNoAlloc( unsigned char *pImageData, const char *fileName, int nXOrigin, int nYOrigin, int width, int height, int nStride, ImageFormat srcFormat );
  24. bool WriteRectNoAllocFeather( unsigned char *pImageData, const char *fileName, int nXOrigin, int nYOrigin, int width, int height, int nGuardBandWidth, int nGuardBandHeight, int nStride, enum ImageFormat srcFormat );
  25. } // end namespace TGAWriter
  26. #endif // TGAWRITER_H