IImageWriter.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 IRR_I_IMAGE_WRITER_H_INCLUDED
  5. #define IRR_I_IMAGE_WRITER_H_INCLUDED
  6. #include "IReferenceCounted.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
  34. #endif // IRR_I_IMAGE_WRITER_H_INCLUDED