add res cache, fix size bug, support 8K exports
This commit is contained in:
parent
0e6a6ae34a
commit
bb06af8a79
8 changed files with 46 additions and 54 deletions
|
@ -50,20 +50,19 @@ void PictureExport::exportAsPicture(QWidget *parent, SnapmaticPicture *picture)
|
|||
// Quality Settings
|
||||
settings.beginGroup("Pictures");
|
||||
int defaultQuality = 100;
|
||||
QSize defExportSize = SnapmaticPicture::getSnapmaticResolution();
|
||||
int customQuality = settings.value("CustomQuality", defaultQuality).toInt();
|
||||
if (customQuality < 1 || customQuality > 100) {
|
||||
if (customQuality < 1 || customQuality > 100)
|
||||
customQuality = 100;
|
||||
}
|
||||
bool useCustomQuality = settings.value("CustomQualityEnabled", false).toBool();
|
||||
|
||||
// Size Settings
|
||||
const QSize defExportSize = QSize(960, 536);
|
||||
QSize cusExportSize = settings.value("CustomSize", defExportSize).toSize();
|
||||
if (cusExportSize.width() > 3840) {
|
||||
cusExportSize.setWidth(3840);
|
||||
if (cusExportSize.width() > 7680) {
|
||||
cusExportSize.setWidth(7680);
|
||||
}
|
||||
else if (cusExportSize.height() > 2160) {
|
||||
cusExportSize.setHeight(2160);
|
||||
else if (cusExportSize.height() > 4320) {
|
||||
cusExportSize.setHeight(4320);
|
||||
}
|
||||
if (cusExportSize.width() < 1) {
|
||||
cusExportSize.setWidth(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue