Copie de ExtendedImage.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef _ExtendedImage_h_
  2. #define _ExtendedImage_h_
  3. #if defined( WIN32 ) && !defined( IMT_DLL )
  4. #include <atlimage.h>
  5. class ExtendedImage : public CImage
  6. #else
  7. class ExtendedImage
  8. #endif
  9. {
  10. public:
  11. ExtendedImage();
  12. #if !defined( WIN32 ) || defined( IMT_DLL )
  13. virtual ~ExtendedImage();
  14. bool Create( int width, int height, int bpp );
  15. void Destroy();
  16. bool IsNull();
  17. bool SetRaw( char* buffer, unsigned long n );
  18. char* GetBits();
  19. char* GetPixel( int x, int y );
  20. void SetPixel( int x, int y, char value );
  21. int GetWidth() { return m_width; }
  22. int GetHeight() { return m_height; }
  23. int GetBPP() { return m_bpp; }
  24. #endif
  25. bool HasCalibration();
  26. void SetResolution( double resX, double resY );
  27. double GetResolutionX() { return m_resX; }
  28. double GetResolutionY() { return m_resY; }
  29. void Copy(int dimh, int dimv, ExtendedImage *vImage);
  30. void Copy2(int dimh, int dimv, ExtendedImage *vImage);
  31. private:
  32. double m_resX;
  33. double m_resY;
  34. #if !defined( WIN32 ) || defined( IMT_DLL )
  35. int m_width;
  36. int m_height;
  37. int m_bpp;
  38. char* m_buffer;
  39. #endif
  40. };
  41. // ! Ne pas utiliser le JPG Avec Save de Cimage car il est compressé et modifie l'image (utilisé le BMP)
  42. #endif