Skip to content

Commit

Permalink
fix loading very large image
Browse files Browse the repository at this point in the history
Basically anything over 5792x5792 or around 33 megapixels.
https://forum.shotcut.org/t/v23-05-x-cannot-open-big-jpeg-pictures-
anymore/38952
  • Loading branch information
ddennedy committed May 30, 2023
1 parent dcd7e61 commit b871ad3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/modules/qt/common.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2014 Dan Dennedy <dan@dennedy.org>
* Copyright (C) 2014-2023 Dan Dennedy <dan@dennedy.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -18,7 +18,7 @@

#include "common.h"
#include <QApplication>
#include <QImage>
#include <QImageReader>
#include <QLocale>

#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
Expand Down Expand Up @@ -52,6 +52,9 @@ bool createQApplicationIfNeeded(mlt_service service)
new QApplication(argc, argv);
const char *localename = mlt_properties_get_lcnumeric(MLT_SERVICE_PROPERTIES(service));
QLocale::setDefault(QLocale(localename));
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QImageReader::setAllocationLimit(1024);
#endif
}
return true;
}
Expand Down

0 comments on commit b871ad3

Please sign in to comment.