1
0

yail.h 838 B

12345678910111213141516171819202122232425
  1. #ifndef _YAIL_H_
  2. #define _YAIL_H_
  3. // yet another image library. Because everything else SUCKS. Fact.
  4. typedef unsigned short RGB565;
  5. class Image {
  6. public:
  7. Image(const ARGB32 * data, int w, int h);
  8. Image(const RGB565 * data, int w, int h, int format, int alignRowBytes, int alignImageBytes);
  9. ~Image();
  10. void exportToRGB565(RGB565* data, int format, int alignRowBytes, int alignImageBytes) const;
  11. void exportToARGB32(ARGB32* data) const;
  12. ARGB32 * getData() {return data;}
  13. int getWidth() const {return width;}
  14. int getHeight() const {return height;}
  15. int get16BitSize(int alignRowBytes, int alignImageBytes) { return get16BitSize(width,height,alignRowBytes, alignImageBytes); }
  16. static int get16BitSize(int width, int height, int alignRowBytes, int alignImageBytes);
  17. protected:
  18. ARGB32 *data;
  19. int width,height;
  20. };
  21. #endif //_YAIL_H_