ImageExport.h 818 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef LIBALMOND_IMAGEEXPORT_H
  2. #define LIBALMOND_IMAGEEXPORT_H
  3. #include "Mandel.h"
  4. #include "Gradient.h"
  5. #include <functional>
  6. namespace alm
  7. {
  8. struct ImageExportInfo
  9. {
  10. mnd::MandelInfo drawInfo;
  11. mnd::MandelGenerator* generator;
  12. Gradient gradient;
  13. std::string path;
  14. };
  15. /**
  16. * \brief generates and saves a fractal image in png format.
  17. *
  18. * \param iei info to generate the image
  19. * \param progressCallback optional function that is called to
  20. * report progress; the float parameter
  21. * contains a value from 0 to 100
  22. */
  23. void exportPng(const ImageExportInfo& iei,
  24. std::function<void(float)> progressCallback = [](float){});
  25. }
  26. #endif // LIBALMOND_IMAGEEXPORT_H