Don't force WEBP format for stickers.

Fixes #5374.
This commit is contained in:
John Preston 2018-11-12 13:16:54 +04:00
parent 0718520f36
commit aba6cc2c64
2 changed files with 5 additions and 8 deletions

View File

@ -1069,14 +1069,11 @@ void DocumentData::checkSticker() {
const auto &loc = location(true);
if (loc.accessEnable()) {
data->image = std::make_unique<Image>(
std::make_unique<Images::LocalFileSource>(
loc.name(),
QByteArray(),
"WEBP"));
std::make_unique<Images::LocalFileSource>(loc.name()));
loc.accessDisable();
}
} else {
auto format = QByteArray("WEBP");
auto format = QByteArray();
auto image = App::readImage(_data, &format, false);
data->image = std::make_unique<Image>(
std::make_unique<Images::LocalFileSource>(

View File

@ -64,10 +64,10 @@ private:
class LocalFileSource : public Source {
public:
LocalFileSource(
explicit LocalFileSource(
const QString &path,
const QByteArray &content,
const QByteArray &format,
const QByteArray &content = QByteArray(),
const QByteArray &format = QByteArray(),
QImage &&data = QImage());
void load(