2020-04-16 12:37:26 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
|
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
|
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "ui/image/image_location.h"
|
|
|
|
|
|
|
|
namespace Main {
|
|
|
|
class Session;
|
|
|
|
} // namespace Main
|
|
|
|
|
|
|
|
namespace Images {
|
|
|
|
|
2020-05-25 14:16:04 +00:00
|
|
|
[[nodiscard]] ImageWithLocation FromPhotoSize(
|
|
|
|
not_null<Main::Session*> session,
|
|
|
|
const MTPDphoto &photo,
|
|
|
|
const MTPPhotoSize &size);
|
2020-08-25 18:03:41 +00:00
|
|
|
[[nodiscard]] ImageWithLocation FromProgressiveSize(
|
|
|
|
not_null<Main::Session*> session,
|
|
|
|
const MTPPhotoSize &size,
|
|
|
|
int index);
|
2020-04-16 12:37:26 +00:00
|
|
|
[[nodiscard]] ImageWithLocation FromPhotoSize(
|
|
|
|
not_null<Main::Session*> session,
|
|
|
|
const MTPDdocument &document,
|
|
|
|
const MTPPhotoSize &size);
|
2020-05-28 10:00:51 +00:00
|
|
|
[[nodiscard]] ImageWithLocation FromPhotoSize(
|
|
|
|
not_null<Main::Session*> session,
|
|
|
|
const MTPDstickerSet &set,
|
|
|
|
const MTPPhotoSize &size);
|
2020-05-22 11:15:09 +00:00
|
|
|
[[nodiscard]] ImageWithLocation FromVideoSize(
|
|
|
|
not_null<Main::Session*> session,
|
|
|
|
const MTPDdocument &document,
|
|
|
|
const MTPVideoSize &size);
|
2020-07-03 08:42:09 +00:00
|
|
|
[[nodiscard]] ImageWithLocation FromVideoSize(
|
|
|
|
not_null<Main::Session*> session,
|
|
|
|
const MTPDphoto &photo,
|
|
|
|
const MTPVideoSize &size);
|
2020-04-16 12:37:26 +00:00
|
|
|
[[nodiscard]] ImageWithLocation FromImageInMemory(
|
|
|
|
const QImage &image,
|
2020-08-26 13:28:56 +00:00
|
|
|
const char *format,
|
|
|
|
QByteArray bytes = QByteArray());
|
2020-04-16 12:37:26 +00:00
|
|
|
[[nodiscard]] ImageLocation FromWebDocument(const MTPWebDocument &document);
|
|
|
|
|
|
|
|
} // namespace Images
|