mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-01 12:17:53 +00:00
Added some format checks
This commit is contained in:
parent
7c37277430
commit
d0fc98b8e5
@ -20,6 +20,17 @@
|
|||||||
|
|
||||||
_frameCount = (int32_t)_animation->totalFrame();
|
_frameCount = (int32_t)_animation->totalFrame();
|
||||||
_frameRate = (int32_t)_animation->frameRate();
|
_frameRate = (int32_t)_animation->frameRate();
|
||||||
|
|
||||||
|
size_t width = 0;
|
||||||
|
size_t height = 0;
|
||||||
|
_animation->size(width, height);
|
||||||
|
|
||||||
|
if (width != height || (width != 100 && width != 512)) {
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
if ((_frameRate > 30 && _frameRate != 60) || _animation->duration() > 4.5) {
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user