Added copy and save of image to AspectRatioPixmapLabel

This commit is contained in:
thunder2 2023-05-14 22:19:16 +02:00
parent e829292eaf
commit 8422d3fc8c
4 changed files with 95 additions and 8 deletions

View file

@ -37,6 +37,7 @@ public:
static bool checkImage(const QTextEdit *edit, const QPoint &pos, QString &imageStr, QRect *cursorRectStartOut = NULL, QRect *cursorRectLeftOut = NULL, QRect *cursorRectRightOut = NULL, QRect *cursorRectEndOut = NULL);
static void extractImage(QWidget *window, QTextCursor cursor, QString file = "");
static void copyImage(QWidget *window, QTextCursor cursor);
static bool saveImage(QWidget *window, const QImage &image, QString file = "");
static bool optimizeSizeHtml(QString &html, const QImage& original, QImage &optimized, int maxPixels = -1, int maxBytes = -1);
static bool optimizeSizeBytes(QByteArray &bytearray, const QImage &original, QImage &optimized, const char *format, int maxPixels, int maxBytes);
static bool hasAlphaContent(const QImage& image);