aboutsummaryrefslogtreecommitdiff
path: root/include/Image.hpp
blob: 19a5e8b67590d8bc65f0abd3bfb89f7258687b13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once

#include "utils.hpp"
#include "types.hpp"
#include "Result.hpp"

namespace amalgine
{
    class Image
    {
        DISABLE_COPY(Image)
    public:
        static Result<Image*> loadFromFile(const char *filepath);
        ~Image();
        
        const unsigned char* getData() const;
        i32 getWidth() const;
        i32 getHeight() const;
    private:
        Image(unsigned char *_imageData, i32 width, i32 height);
    private:
        unsigned char *imageData;
        i32 width;
        i32 height;
    };
}