2013-03-28 10:04:07 -07:00
|
|
|
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
2008-05-22 04:51:37 -07:00
|
|
|
// This file is part of the "Irrlicht Engine".
|
|
|
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
|
|
|
|
2021-08-30 14:06:51 -07:00
|
|
|
#ifndef IRR_I_IMAGE_WRITER_H_INCLUDED
|
|
|
|
#define IRR_I_IMAGE_WRITER_H_INCLUDED
|
2007-05-20 11:03:49 -07:00
|
|
|
|
2007-09-06 23:11:47 -07:00
|
|
|
#include "IReferenceCounted.h"
|
2009-05-04 17:09:53 -07:00
|
|
|
#include "irrString.h"
|
|
|
|
#include "coreutil.h"
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
namespace irr
|
|
|
|
{
|
|
|
|
namespace io
|
|
|
|
{
|
|
|
|
class IWriteFile;
|
|
|
|
} // end namespace io
|
|
|
|
|
|
|
|
namespace video
|
|
|
|
{
|
|
|
|
class IImage;
|
|
|
|
|
|
|
|
|
|
|
|
//! Interface for writing software image data.
|
2007-09-06 23:11:47 -07:00
|
|
|
class IImageWriter : public IReferenceCounted
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
public:
|
2008-05-22 04:51:37 -07:00
|
|
|
//! Check if this writer can write a file with the given extension
|
2009-11-02 09:20:21 -08:00
|
|
|
/** \param filename Name of the file to check.
|
2008-05-22 04:51:37 -07:00
|
|
|
\return True if file extension specifies a writable type. */
|
2009-09-16 05:48:19 -07:00
|
|
|
virtual bool isAWriteableFileExtension(const io::path& filename) const = 0;
|
2007-05-20 11:03:49 -07:00
|
|
|
|
2008-05-22 04:51:37 -07:00
|
|
|
//! Write image to file
|
|
|
|
/** \param file File handle to write to.
|
|
|
|
\param image Image to write into file.
|
|
|
|
\param param Writer specific parameter, influencing e.g. quality.
|
|
|
|
\return True if image was successfully written. */
|
2007-09-16 16:41:55 -07:00
|
|
|
virtual bool writeImage(io::IWriteFile *file, IImage *image, u32 param = 0) const = 0;
|
2007-05-20 11:03:49 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace video
|
|
|
|
} // namespace irr
|
|
|
|
|
2021-08-30 14:06:51 -07:00
|
|
|
#endif // IRR_I_IMAGE_WRITER_H_INCLUDED
|