2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Remove force-disabling of Qt's color space support for sent images

Qt had a bug with interpreting PNG gamma, but it seems it's fixed now.
This commit is contained in:
Ilya Fedin
2022-12-27 01:26:24 +04:00
committed by John Preston
parent 7f969e5102
commit 2cbd2725e5
3 changed files with 2 additions and 7 deletions

View File

@@ -39,7 +39,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtCore/QBuffer>
#include <QtGui/QImageWriter>
#include <QtGui/QColorSpace>
namespace {
@@ -181,10 +180,6 @@ struct PreparedFileThumbnail {
return bytes;
}
// We have an example of dark .png image that when being sent without
// removing its color space is displayed fine on tdesktop, but with
// a light gray background on mobile apps.
full.setColorSpace(QColorSpace());
auto result = QByteArray();
QBuffer buffer(&result);
QImageWriter writer(&buffer, "JPEG");