/*---------------------------------------------------------------------------* Copyright (C) 2013-2014 Nintendo. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. *---------------------------------------------------------------------------*/ #ifndef NN_EC_IMAGE_FILE_H_ #define NN_EC_IMAGE_FILE_H_ #include namespace nn { namespace ec { //! @addtogroup nn_ec_class //! @{ /*! @brief Class for handling image files. */ class ImageFile : public File { public: /*! @brief Instantiates the object. */ ImageFile(); /*! @brief Destroys the object. */ ~ImageFile(); /*! @brief Gets the image width. @return Returns the image width. */ const u32 GetWidth() const; /*! @brief Gets the image height. @return Returns the image height. */ const u32 GetHeight() const; /*! @brief Gets the image size. The image size is calculated as width × height × color depth. @return Returns the image size. */ const size_t GetImageSize() const; /*! @brief Decodes the image. @param[out] pBuffer Specifies the buffer for storing the decoded image data. @n Set the buffer size to no less than @ref GetImageSize. @return The result of processing. @retval Result::IsSuccess Indicates success. @retval ResultInvalidArgument Indicates that an argument is invalid. @retval ResultInvalidData Indicates that the data is invalid. (It is not a decodable image file.) @retval ResultOutOfMemory Insufficient memory. */ nn::Result Decode(u32* pBuffer) const; }; //! @} }} // namespace nn::ec #endif // NN_EC_IMAGE_FILE_H_