IImageWriter.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright (C) 2002-2012 Nikolaus Gebhardt
  2. // This file is part of the "Irrlicht Engine".
  3. // For conditions of distribution and use, see copyright notice in irrlicht.h
  4. #pragma once
  5. #include "IReferenceCounted.h"
  6. #include "path.h"
  7. namespace irr
  8. {
  9. namespace io
  10. {
  11. class IWriteFile;
  12. } // end namespace io
  13. namespace video
  14. {
  15. class IImage;
  16. //! Interface for writing software image data.
  17. class IImageWriter : public IReferenceCounted
  18. {
  19. public:
  20. //! Check if this writer can write a file with the given extension
  21. /** \param filename Name of the file to check.
  22. \return True if file extension specifies a writable type. */
  23. virtual bool isAWriteableFileExtension(const io::path &filename) const = 0;
  24. //! Write image to file
  25. /** \param file File handle to write to.
  26. \param image Image to write into file.
  27. \param param Writer specific parameter, influencing e.g. quality.
  28. \return True if image was successfully written. */
  29. virtual bool writeImage(io::IWriteFile *file, IImage *image, u32 param = 0) const = 0;
  30. };
  31. } // namespace video
  32. } // namespace irr