You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWATI/Include/iBase/iUtils/ZxImgHelper.h

33 lines
686 B
C

#pragma once
#include "Defines.h"
#include "LlUtils_global.h"
union rgbEx
{
uint rgba;
uchar bits[4];
};
/// @brief Image相关
class I_UTILSSHARED_EXPORT ZxImgHelper
{
public:
ZxImgHelper();
~ZxImgHelper();
// 加载图片文件至oImg支持大图
static bool loadImg(QImage& oImg, QString sFile);
// 旋转(倾斜度校正)
// 顺时针旋转的角度,不需弧度转换, fAngle:0-360
static bool rotateImg(QImage& oImg, \
float fAngle, \
bool bAdjustBkClr = true);
// 更改因为旋转而导致的背景颜色(黑色)
static bool changeRotBkClr(QImage& oImg);
};