class cogs::Image — HIRO 0.7.0 documentation

# class cogs::Image

    #include <Image.h>

    class Image {
    public:
        // construction

        Image();
        Image(const std::string& file_path);
        Image(uint16_t width, uint16_t height);

        // methods

        uint16_t GetWidth() const;
        uint16_t GetHeight() const;
        void LoadFromFile(const std::string& file_path);
        void SaveToFile(const std::string& file_path);
        const cogs::Color4b GetColorAt(const glm::vec2& uv) const;
        const cogs::Color4b GetPixel(int32_t x, int32_t y) const;
        void SetPixel(int32_t x, int32_t y, const cogs::Color3b& color);
    };