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.

bitmap.h 796B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * =====================================================================================
  3. *
  4. * Filename: bitmap.h
  5. *
  6. * Description: Stores a bitmap
  7. *
  8. * Version: 1.0
  9. * Created: 04/02/2014 07:19:09 PM
  10. * Revision: none
  11. * Compiler: gcc
  12. *
  13. * Author: YOUR NAME (),
  14. * Organization:
  15. *
  16. * =====================================================================================
  17. */
  18. #pragma once
  19. #include <string>
  20. namespace vtk {
  21. class Bitmap {
  22. public:
  23. Bitmap();
  24. bool loadFromFile(const std::string& fileName);
  25. unsigned char* getPixelDataPtr();
  26. int getHeight();
  27. int getWidth();
  28. int getNumChannels();
  29. void flipVertical();
  30. protected:
  31. unsigned char* imageData;
  32. int x, y, n;
  33. int forceChannels;
  34. };
  35. }