Fl_PNG_Image.H 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //
  2. // "$Id: Fl_PNG_Image.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
  3. //
  4. // PNG image header file for the Fast Light Tool Kit (FLTK).
  5. //
  6. // Copyright 1998-2010 by Bill Spitzak and others.
  7. //
  8. // This library is free software. Distribution and use rights are outlined in
  9. // the file "COPYING" which should have been included with this file. If this
  10. // file is missing or damaged, see the license at:
  11. //
  12. // http://www.fltk.org/COPYING.php
  13. //
  14. // Please report all bugs and problems on the following page:
  15. //
  16. // http://www.fltk.org/str.php
  17. //
  18. /* \file
  19. Fl_PNG_Image class . */
  20. #ifndef Fl_PNG_Image_H
  21. #define Fl_PNG_Image_H
  22. # include "Fl_Image.H"
  23. /**
  24. The Fl_PNG_Image class supports loading, caching,
  25. and drawing of Portable Network Graphics (PNG) image files. The
  26. class loads colormapped and full-color images and handles color-
  27. and alpha-based transparency.
  28. */
  29. class FL_EXPORT Fl_PNG_Image : public Fl_RGB_Image {
  30. public:
  31. Fl_PNG_Image(const char* filename);
  32. Fl_PNG_Image (const char *name_png, const unsigned char *buffer, int datasize);
  33. static int encode(Fl_Image *img, unsigned char **outbuffer, int &outlen);
  34. private:
  35. void load_png_(const char *name_png, const unsigned char *buffer_png, int datasize);
  36. DECLARE_CLASS_CHEAP_RTTI_2(Fl_PNG_Image, Fl_RGB_Image)
  37. };
  38. #endif
  39. //
  40. // End of "$Id: Fl_PNG_Image.H 8864 2011-07-19 04:49:30Z greg.ercolano $".
  41. //