qt_demoe/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/base64.h

38 lines
906 B
C
Raw Normal View History

2021-09-13 08:12:35 +00:00
#ifndef BASE64_H
#define BASE64_H
2020-04-22 06:36:41 +00:00
/**
2021-09-13 08:12:35 +00:00
* base64 :feiyangqingyun(QQ:517216493) 2016-12-16
* 1. base64
* 2. base64
* 3. base64
* 4. base64
* 5.
* 6. Qt6base64200%
2020-04-22 06:36:41 +00:00
*/
2021-09-13 08:12:35 +00:00
#include <QImage>
2020-04-22 06:36:41 +00:00
2021-09-13 08:12:35 +00:00
#ifdef quc
class Q_DECL_EXPORT Base64
#else
class Base64
#endif
2020-04-22 06:36:41 +00:00
2021-09-13 08:12:35 +00:00
{
public:
//图片转base64字符串
static QString imageToBase64(const QImage &image);
static QByteArray imageToBase64x(const QImage &image);
2020-04-22 06:36:41 +00:00
2021-09-13 08:12:35 +00:00
//base64字符串转图片
static QImage base64ToImage(const QString &data);
static QImage base64ToImagex(const QByteArray &data);
2020-04-22 06:36:41 +00:00
2021-09-13 08:12:35 +00:00
//字符串与base64互转
static QString textToBase64(const QString &text);
static QString base64ToText(const QString &text);
};
2020-04-22 06:36:41 +00:00
2021-09-13 08:12:35 +00:00
#endif // BASE64_H