#pragma once

/*
	GameEngine and Editor
	by John Ryland
	Copyright (c) 2023
*/

////////////////////////////////////////////////////////////////////////////////////
//	Image

#include <cstdint>

namespace GameEngine {

class Image
{
public:
    Image();
    ~Image();

    void Assign(int width, int height, uint8_t* data, bool transferOwnership);
    void Load(const char *filename);

    int Width() const { return width; }
    int Height() const { return height; }
    int Components() const { return components; }
    uint8_t* Data() const { return data; }

private:
    bool        ownData;
    uint8_t*    data;
    int         width, height, components;
};

} // GameEngine namespace
