2017-07-19 23:20:32 +02:00
|
|
|
#pragma once
|
2011-09-07 23:06:51 +02:00
|
|
|
|
2013-08-09 06:57:18 +02:00
|
|
|
// Image Options
|
|
|
|
#define LC_IMAGE_TRANSPARENT 0x2000
|
2016-05-31 00:41:03 +02:00
|
|
|
//#define LC_IMAGE_MASK 0x7000
|
2013-08-09 06:57:18 +02:00
|
|
|
|
2021-11-15 04:10:16 +01:00
|
|
|
enum class lcPixelFormat
|
2013-08-31 23:58:47 +02:00
|
|
|
{
|
2021-11-15 04:10:16 +01:00
|
|
|
Invalid,
|
|
|
|
A8,
|
|
|
|
L8A8,
|
|
|
|
R8G8B8,
|
|
|
|
R8G8B8A8
|
2013-08-31 23:58:47 +02:00
|
|
|
};
|
|
|
|
|
2011-09-07 23:06:51 +02:00
|
|
|
class Image
|
|
|
|
{
|
|
|
|
public:
|
2012-03-23 00:44:56 +01:00
|
|
|
Image();
|
2018-09-30 04:45:21 +02:00
|
|
|
Image(Image&& Other);
|
2021-11-21 21:16:19 +01:00
|
|
|
~Image();
|
2012-03-23 00:44:56 +01:00
|
|
|
|
2020-05-04 00:39:39 +02:00
|
|
|
Image(const Image&) = delete;
|
|
|
|
Image& operator=(const Image&) = delete;
|
|
|
|
Image& operator=(Image&&) = delete;
|
|
|
|
|
2013-08-31 23:58:47 +02:00
|
|
|
int GetBPP() const;
|
|
|
|
bool HasAlpha() const;
|
|
|
|
|
2013-08-09 06:57:18 +02:00
|
|
|
bool FileLoad(lcMemFile& File);
|
2017-05-29 22:31:24 +02:00
|
|
|
bool FileLoad(const QString& FileName);
|
2012-03-23 00:44:56 +01:00
|
|
|
|
2013-08-09 06:57:18 +02:00
|
|
|
void Resize(int Width, int Height);
|
2012-03-23 00:44:56 +01:00
|
|
|
void ResizePow2();
|
2013-08-31 23:58:47 +02:00
|
|
|
void Allocate(int Width, int Height, lcPixelFormat Format);
|
2012-03-23 00:44:56 +01:00
|
|
|
void FreeData();
|
|
|
|
|
2013-08-09 06:57:18 +02:00
|
|
|
int mWidth;
|
|
|
|
int mHeight;
|
2013-08-31 23:58:47 +02:00
|
|
|
lcPixelFormat mFormat;
|
2013-08-09 06:57:18 +02:00
|
|
|
unsigned char* mData;
|
2011-09-07 23:06:51 +02:00
|
|
|
};
|
|
|
|
|