You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
936 B

#ifndef BASE64HELPER_H
#define BASE64HELPER_H
/**
* base64 :feiyangqingyun(QQ:517216493) 2016-12-16
* 1. base64
* 2. base64
* 3. base64
* 4. base64
* 5.
* 6. Qt6base64200%
*/
#include <QImage>
#ifdef quc
class Q_DECL_EXPORT Base64Helper
#else
class Base64Helper
#endif
{
public:
//图片转base64字符串
static QString imageToBase64(const QImage &image);
static QByteArray imageToBase64x(const QImage &image);
//base64字符串转图片
static QImage base64ToImage(const QString &data);
static QImage base64ToImagex(const QByteArray &data);
//字符串与base64互转
static QString textToBase64(const QString &text);
static QString base64ToText(const QString &text);
};
#endif // BASE64HELPER_H