IMAGEAFP.H 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. ////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2016 RWS Inc, All Rights Reserved
  4. //
  5. // This program is free software; you can redistribute it and/or modify
  6. // it under the terms of version 2 of the GNU General Public License as published by
  7. // the Free Software Foundation
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License along
  15. // with this program; if not, write to the Free Software Foundation, Inc.,
  16. // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. //
  18. // IMAGEAFP.H
  19. //
  20. // Created on 10/17/95 BRH
  21. // Implemented on 10/17/95 BRH
  22. //
  23. // 10/17/95 BRH Split this from imagetyp.h to avoid multiple
  24. // inclusion of the array of function pointers.
  25. //
  26. // 10/26/95 BRH Added ConvertToSCREEN24_RGB to support one of the
  27. // more standard windows screen formats.
  28. //
  29. // When adding a convert function:
  30. // ------------------------------
  31. // Make sure you add a enumerated type to imagetyp.h, preferably
  32. // just before END_OF_TYPES and then add your convert function to
  33. // the afpConvert array in the proper place. Your convert function
  34. // will be indexed by your image type, for example image type BMP8
  35. // = 1 in the enumerated type list and so afpConvert[1] =
  36. // ConvertToBMP8. Then you can add your function prototype to
  37. // imagecon.h and the implementation to imagecon.cpp, or you can
  38. // put your convert function in your own files. In that case you
  39. // will need to #include your .h file in this header file.
  40. //
  41. //////////////////////////////////////////////////////////////////////
  42. #ifndef IMAGEAFP_H
  43. #define IMAGEAFP_H
  44. #include "imagecon.h"
  45. typedef short (*CONVFUNC)(CImage* pImage);
  46. // These are "convert to..." functions which should first check the current image type
  47. // to see if it can convert from the current type to the specified type
  48. CONVFUNC afpConvert[255] =
  49. {
  50. ConvertNoSupport,
  51. ConvertToBMP8,
  52. ConvertToSystem,
  53. ConvertToSCREEN8_555,
  54. ConvertToSCREEN8_565,
  55. ConvertToSCREEN8_888,
  56. ConvertToBMP24,
  57. ConvertToSCREEN16_555,
  58. ConvertToSCREEN16_565,
  59. ConvertToSCREEN24_RGB,
  60. ConvertToSCREEN32_ARGB,
  61. ConvertToBKD8
  62. };
  63. #endif //IMAGEAFP_H