Set emote format to apng if png supports animation (#379)
This commit is contained in:
parent
d308fc83de
commit
e2c447f1d7
@ -61,6 +61,15 @@ void AOCharMovie::load_image(QString p_char, QString p_emote,
|
||||
return;
|
||||
|
||||
m_reader->setFileName(emote_path);
|
||||
|
||||
// set format to apng if png supports animation
|
||||
if (emote_path.endsWith("png")) {
|
||||
m_reader->setFormat("apng");
|
||||
if (!m_reader->supportsAnimation()) {
|
||||
m_reader->setFormat("png");
|
||||
}
|
||||
}
|
||||
|
||||
QPixmap f_pixmap = this->get_pixmap(m_reader->read());
|
||||
int f_delay = m_reader->nextImageDelay();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user