Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
1.7 KiB

  1. /**************************************************************************\
  2. *
  3. * Copyright (c) 1999-2000 Microsoft Corporation
  4. *
  5. * Module name:
  6. *
  7. * The "GammaConvert" scan operation.
  8. *
  9. * Abstract:
  10. *
  11. * See Gdiplus\Specs\ScanOperation.doc for an overview.
  12. *
  13. * These operations convert from one format to another, accounting
  14. * for differing gamma ramps.
  15. *
  16. * Revision History:
  17. *
  18. * 12/06/1999 agodfrey
  19. * Created it.
  20. *
  21. \**************************************************************************/
  22. #include "precomp.hpp"
  23. /**************************************************************************\
  24. *
  25. * Operation Description:
  26. *
  27. * GammaConvert: Convert from one format to another, accounting
  28. * for differing gamma ramps.
  29. *
  30. * Arguments:
  31. *
  32. * dst - The destination scan
  33. * src - The source scan
  34. * count - The length of the scan, in pixels
  35. * otherParams - Additional conversion data.
  36. *
  37. * Return Value:
  38. *
  39. * None
  40. *
  41. * History:
  42. *
  43. * 12/07/1999 agodfrey
  44. * Created it.
  45. *
  46. \**************************************************************************/
  47. // 32bpp sRGB to 64bpp sRGB64
  48. VOID FASTCALL
  49. ScanOperation::GammaConvert_sRGB_sRGB64(
  50. VOID *dst,
  51. const VOID *src,
  52. INT count,
  53. const OtherParams *otherParams
  54. )
  55. {
  56. DEFINE_POINTERS(ARGB, ARGB64)
  57. while (count--)
  58. {
  59. sRGB::ConvertTosRGB64(*s++,d++);
  60. }
  61. }
  62. // 64bpp sRGB64 to 32bpp sRGB
  63. VOID FASTCALL
  64. ScanOperation::GammaConvert_sRGB64_sRGB(
  65. VOID *dst,
  66. const VOID *src,
  67. INT count,
  68. const OtherParams *otherParams
  69. )
  70. {
  71. DEFINE_POINTERS(ARGB64, ARGB)
  72. while (count--)
  73. {
  74. *d++ = sRGB::ConvertTosRGB(*s++);
  75. }
  76. }