ImageFactory_Gdiplus.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (C) =USTC= Fu Li
  3. *
  4. * Author : Fu Li
  5. * Create : 2005-7-29
  6. * Home : http://www.crazy-bit.com/
  7. * Mail : crazybit@263.net
  8. * History :
  9. */
  10. #ifdef PCL_3RD_LIBRARY_USE_GDIPLUS
  11. #ifndef __FOO_IMAGEFACTORY_GDIPLUS__2005_07_29__H__
  12. #define __FOO_IMAGEFACTORY_GDIPLUS__2005_07_29__H__
  13. #include "ImageFactory_Mini.h"
  14. #include "ImageHandle_Gdiplus.h"
  15. //class FCImageHandleFactory ;
  16. class FCImageHandleFactory_Gdiplus ;
  17. //=============================================================================
  18. /**
  19. * Read/Write image via GDI+ (<B>Need Gdiplus.dll</B>).
  20. @verbatim
  21. BMP TGA Jpg Gif Tif Png
  22. Read O O O O O O
  23. Write O O O O O O
  24. @endverbatim
  25. */
  26. class FCImageHandleFactory_Gdiplus : public FCImageHandleFactory
  27. {
  28. virtual FCImageHandleBase* CreateImageHandle (IMAGE_TYPE imgType)
  29. {
  30. switch (imgType)
  31. {
  32. case IMG_BMP : return new FCImageHandle_Bmp ;
  33. case IMG_TGA : return new FCImageHandle_Tga ;
  34. case IMG_JPG : return new FCImageHandle_Gdiplus ;
  35. case IMG_GIF : return new FCImageHandle_Gdiplus ;
  36. case IMG_TIF : return new FCImageHandle_Gdiplus ;
  37. case IMG_PNG : return new FCImageHandle_Gdiplus ;
  38. }
  39. return 0 ;
  40. }
  41. virtual ~FCImageHandleFactory_Gdiplus() {}
  42. };
  43. //=============================================================================
  44. // inline Implement
  45. //=============================================================================
  46. #endif
  47. #endif // PCL_3RD_LIBRARY_USE_GDIPLUS