IImageWriter.h 1.2 KB

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