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.

45 lines
1.4 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. // $NoKeywords: $
  8. //===========================================================================//
  9. #ifndef TGALOADER_H
  10. #define TGALOADER_H
  11. #ifdef _WIN32
  12. #pragma once
  13. #endif
  14. #include "bitmap/imageformat.h"
  15. #include "tier1/utlmemory.h"
  16. //-----------------------------------------------------------------------------
  17. // Forward declarations
  18. //-----------------------------------------------------------------------------
  19. class CUtlBuffer;
  20. namespace TGALoader
  21. {
  22. int TGAHeaderSize();
  23. bool GetInfo( const char *fileName, int *width, int *height, ImageFormat *imageFormat, float *sourceGamma );
  24. bool GetInfo( CUtlBuffer &buf, int *width, int *height, ImageFormat *imageFormat, float *sourceGamma );
  25. bool Load( unsigned char *imageData, const char *fileName, int width, int height,
  26. ImageFormat imageFormat, float targetGamma, bool mipmap );
  27. bool Load( unsigned char *imageData, CUtlBuffer &buf, int width, int height,
  28. ImageFormat imageFormat, float targetGamma, bool mipmap );
  29. bool LoadRGBA8888( const char *pFileName, CUtlMemory<unsigned char> &outputData, int &outWidth, int &outHeight );
  30. bool LoadRGBA8888( CUtlBuffer &buf, CUtlMemory<unsigned char> &outputData, int &outWidth, int &outHeight );
  31. } // end namespace TGALoader
  32. #endif // TGALOADER_H