mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Use final Image with different Images::Source-s.
This commit is contained in:
@@ -660,8 +660,8 @@ bool DocumentData::loaded(FilePathResolveType type) const {
|
||||
auto that = const_cast<DocumentData*>(this);
|
||||
that->_location = FileLocation(_loader->fileName());
|
||||
that->_data = _loader->bytes();
|
||||
if (that->sticker() && !_loader->imagePixmap().isNull()) {
|
||||
that->sticker()->img = ImagePtr(_data, _loader->imageFormat(), _loader->imagePixmap());
|
||||
if (that->sticker() && !_loader->imageData().isNull()) {
|
||||
that->sticker()->img = ImagePtr(_data, _loader->imageFormat(), _loader->imageData());
|
||||
}
|
||||
destroyLoaderDelayed();
|
||||
}
|
||||
@@ -954,7 +954,7 @@ ImagePtr DocumentData::makeReplyPreview(Data::FileOrigin origin) {
|
||||
auto options = Images::Option::Smooth | (isVideoMessage() ? Images::Option::Circled : Images::Option::None) | Images::Option::TransparentBackground;
|
||||
auto outerSize = st::msgReplyBarSize.height();
|
||||
auto image = thumb->pixNoCache(origin, thumbSize.width(), thumbSize.height(), options, outerSize, outerSize);
|
||||
replyPreview = ImagePtr(image, "PNG");
|
||||
replyPreview = ImagePtr(image.toImage(), "PNG");
|
||||
} else {
|
||||
thumb->load(origin);
|
||||
}
|
||||
|
Reference in New Issue
Block a user