2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Version for OS X 10.6-10.7 build from GYP is ready, not tested yet.

This commit is contained in:
John Preston
2016-08-29 23:24:16 -06:00
parent b821978a36
commit 50616cc267
26 changed files with 264 additions and 77 deletions

View File

@@ -21,9 +21,9 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "stdafx.h"
#include "app.h"
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
#ifdef OS_MAC_OLD
#include <libexif/exif-data.h>
#endif
#endif // OS_MAC_OLD
#include "styles/style_overview.h"
#include "styles/style_mediaview.h"
@@ -2395,9 +2395,9 @@ namespace {
}
{
QImageReader reader(&buffer, *format);
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
#ifndef OS_MAC_OLD
reader.setAutoTransform(true);
#endif
#endif // OS_MAC_OLD
if (animated) *animated = reader.supportsAnimation() && reader.imageCount() > 1;
QByteArray fmt = reader.format();
if (!fmt.isEmpty()) *format = fmt;
@@ -2410,7 +2410,7 @@ namespace {
buffer.seek(0);
QString fmt = QString::fromUtf8(*format).toLower();
if (fmt == "jpg" || fmt == "jpeg") {
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
#ifdef OS_MAC_OLD
ExifData *exifData = exif_data_new_from_data((const uchar*)(data.constData()), data.size());
if (exifData) {
ExifByteOrder byteOrder = exif_data_get_byte_order(exifData);
@@ -2431,7 +2431,7 @@ namespace {
}
exif_data_free(exifData);
}
#endif
#endif // OS_MAC_OLD
} else if (opaque && result.hasAlphaChannel()) {
QImage solid(result.width(), result.height(), QImage::Format_ARGB32_Premultiplied);
solid.fill(st::white->c);