IImageWriter.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 "irrString.h"
  7. #include "coreutil.h"
  8. namespace irr
  9. {
  10. namespace io
  11. {
  12. class IWriteFile;
  13. } // end namespace io
  14. namespace video
  15. {
  16. class IImage;
  17. //! Interface for writing software image data.
  18. class IImageWriter : public IReferenceCounted
  19. {
  20. public:
  21. //! Check if this writer can write a file with the given extension
  22. /** \param filename Name of the file to check.
  23. \return True if file extension specifies a writable type. */
  24. virtual bool isAWriteableFileExtension(const io::path &filename) const = 0;
  25. //! Write image to file
  26. /** \param file File handle to write to.
  27. \param image Image to write into file.
  28. \param param Writer specific parameter, influencing e.g. quality.
  29. \return True if image was successfully written. */
  30. virtual bool writeImage(io::IWriteFile *file, IImage *image, u32 param = 0) const = 0;
  31. };
  32. } // namespace video
  33. } // namespace irr