3
0

ImageToProcess.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <Atom/ImageProcessing/PixelFormats.h>
  10. #include <Atom/ImageProcessing/ImageObject.h>
  11. #include <Compressors/Compressor.h>
  12. #include <ImageBuilderBaseType.h>
  13. namespace ImageProcessingAtom
  14. {
  15. class ImageToProcess
  16. {
  17. private:
  18. IImageObjectPtr m_img;
  19. ICompressor::CompressOption m_compressOption;
  20. private:
  21. ImageToProcess(const ImageToProcess&);
  22. public:
  23. ImageToProcess(IImageObjectPtr img)
  24. {
  25. m_img = img;
  26. }
  27. ~ImageToProcess()
  28. {
  29. }
  30. void Set(IImageObjectPtr img)
  31. {
  32. m_img = img;
  33. }
  34. IImageObjectPtr Get() const
  35. {
  36. return m_img;
  37. }
  38. ICompressor::CompressOption& GetCompressOption()
  39. {
  40. return m_compressOption;
  41. }
  42. void SetCompressOption(const ICompressor::CompressOption& compressOption)
  43. {
  44. m_compressOption = compressOption;
  45. }
  46. public:
  47. // ---------------------------------------------------------------------------------
  48. //! can be used to compress, requires a preset
  49. void ConvertFormat(EPixelFormat fmtTo);
  50. void ConvertFormatUncompressed(EPixelFormat fmtTo);
  51. // ---------------------------------------------------------------------------------
  52. // Arguments:
  53. // bDeGamma - apply de-gamma correction
  54. bool GammaToLinearRGBA32F(bool bDeGamma);
  55. void LinearToGamma();
  56. //convert various original cubemap layouts to new layout
  57. bool ConvertCubemapLayout(CubemapLayoutType newLayout);
  58. };
  59. }// namespace ImageProcessingAtom