Open Source Tomb Raider Engine
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

png.h 910B

1234567891011121314151617181920212223242526272829303132
  1. /*!
  2. * \file include/utils/png.h
  3. * \brief PNG image reader
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _UTILS_PNG_H_
  8. #define _UTILS_PNG_H_
  9. /*!
  10. * \brief Load a PNG image file into an RGBA buffer
  11. * \param filename path of file to read
  12. * \param image place where allocated buffer of size (width * height * 4) will be allocated
  13. * \param width place where image width will be stored
  14. * \param height place where image height will be stored
  15. * \returns 0 on success
  16. */
  17. int pngLoad(const char *filename, unsigned char **image, unsigned int *width, unsigned int *height);
  18. /*!
  19. * \brief Create a PNG image file from an RGBA buffer
  20. * \param filename path of file to create
  21. * \param image buffer of size (width * height * 4)
  22. * \param width image width
  23. * \param height image height
  24. * \returns 0 on success
  25. */
  26. int pngSave(const char *filename, unsigned char *image, unsigned int width, unsigned int height);
  27. #endif