Rise post size

This commit is contained in:
hunbernd 2020-01-05 21:00:13 +01:00
parent a988b1dd8b
commit 5efd318cb5
3 changed files with 4 additions and 3 deletions

View File

@ -62,6 +62,7 @@ PostedCreatePostDialog::PostedCreatePostDialog(TokenQueue* tokenQ, RsPosted *pos
ui->hashBox->setAutoHide(true);
ui->hashBox->setDefaultTransferRequestFlags(RS_FILE_REQ_ANONYMOUS_ROUTING);
connect(ui->hashBox, SIGNAL(fileHashingFinished(QList<HashedFile>)), this, SLOT(fileHashingFinished(QList<HashedFile>)));
ui->sizeWarningLabel->setText(QString("Post size is limited to %1 KB, pictures will be downscaled.").arg(MAXMESSAGESIZE / 1024));
/* fill in the available OwnIds for signing */
ui->idChooser->loadIds(IDCHOOSER_ID_REQUIRED, RsGxsId());
@ -189,7 +190,7 @@ void PostedCreatePostDialog::addPicture()
}
QImage opt;
if(ImageUtil::optimizeSizeBytes(imagebytes, image, opt, 800*600, MAXMESSAGESIZE - 1000)) { //Leave space for other stuff
if(ImageUtil::optimizeSizeBytes(imagebytes, image, opt, 800*600, MAXMESSAGESIZE - 2000)) { //Leave space for other stuff
ui->imageLabel->setPixmap(QPixmap::fromImage(opt));
} else {
imagefilename = "";

View File

@ -47,7 +47,7 @@ public:
private:
QString imagefilename;
QByteArray imagebytes;
const int MAXMESSAGESIZE = 32000;
const int MAXMESSAGESIZE = 199000;
private slots:
void createPost();

View File

@ -187,7 +187,7 @@
</spacer>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label">
<widget class="QLabel" name="sizeWarningLabel">
<property name="text">
<string>Post size is limited to 32 KB, pictures will be downscaled.</string>
</property>