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
687 B
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#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, \
double fAngle, \
bool bAdjustBkClr = true);
// 更改因为旋转而导致的背景颜色(黑色)
static bool changeRotBkClr(QImage& oImg);
};