BVB Source Codes

CRYENGINE Show BMPHelper.h Source code

Return Download CRYENGINE: download BMPHelper.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. // -------------------------------------------------------------------------
  4. //  File name:   BMPHelper.h
  5. //  Version:     v1.00
  6. //  Created:     28/11/2006 by AlexL
  7. //  Compilers:   Visual Studio.NET
  8. //  Description: BMPHelper
  9. // -------------------------------------------------------------------------
  10. //  History:
  11. //
  12. ////////////////////////////////////////////////////////////////////////////
  13.  
  14. #ifndef __BMPHELPER_H__
  15. #define __BMPHELPER_H__
  16.  
  17. #pragma once
  18.  
  19. namespace BMPHelper
  20. {
  21. // load a BMP. if pByteData is 0, only reports dimensions
  22. // when pFile is given, restores read location after getting dimensions only
  23. bool LoadBMP(const char* filename, uint8* pByteData, int& width, int& height, int& depth, bool bForceInverseY = false);
  24. bool LoadBMP(FILE* pFile, uint8* pByteData, int& width, int& height, int& depth, bool bForceInverseY = false);
  25.  
  26. // save pByteData BGR[A] into a new file 'filename'. if bFlipY flips y.
  27. // if depth==4 assumes BGRA
  28. bool SaveBMP(const char* filename, uint8* pByteData, int width, int height, int depth, bool inverseY);
  29. // save pByteData BGR[A] into a file pFile. if bFlipY flips y.
  30. // if depth==4 assumes BGRA
  31. bool   SaveBMP(FILE* pFile, uint8* pByteData, int width, int height, int depth, bool inverseY);
  32. // calculate size of BMP incl. Header and padding bytes
  33. size_t CalcBMPSize(int width, int height, int depth);
  34. };
  35.  
  36. #endif
  37.  
downloadBMPHelper.h Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top