@ImageConvert.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /******************************************************************************/
  2. class ImageConvert
  3. {
  4. enum FAMILY
  5. {
  6. ELM_IMAGE ,
  7. ELM_IMAGE_ATLAS,
  8. ELM_FONT ,
  9. ELM_PANEL_IMAGE,
  10. IMAGE ,
  11. };
  12. bool pow2 ,
  13. clamp ,
  14. alpha_lum,
  15. has_color ,
  16. has_alpha ,
  17. ignore_alpha,
  18. mtrl_base_1;
  19. byte downsize;
  20. int mip_maps,
  21. max_size;
  22. VecI2 size;
  23. FAMILY family ;
  24. Str src, dest ; // src and dest files
  25. DateTime time ; // date time to set after converting
  26. int type, mode;
  27. static SyncLock Lock;
  28. void set(C Str &src, C Str &dest, C DateTime &time, int type, bool ignore_alpha, bool clamp, bool mtrl_base_1=false, byte downsize=0, int max_size=0);
  29. void set(C Str &src, C Str &dest, C DateTime &time, C ElmImage &data, IMAGE_TYPE type);
  30. void set(C Str &src, C Str &dest, C DateTime &time, C ElmIcon &data, IMAGE_TYPE type);
  31. void set(C Str &src, C Str &dest, C DateTime &time, C ElmImageAtlas &data, IMAGE_TYPE type);
  32. void set(C Str &src, C Str &dest, C DateTime &time, C ElmFont &data, IMAGE_TYPE type);
  33. void set(C Str &src, C Str &dest, C DateTime &time, C ElmPanelImage &data, IMAGE_TYPE type);
  34. static bool SkipOptimize(int &type, DateTime &time); // skip formats which are slow to convert
  35. void process(C bool *stop=null)C;
  36. public:
  37. ImageConvert();
  38. };
  39. /******************************************************************************/
  40. /******************************************************************************/
  41. /******************************************************************************/