| @@ 100-110 (lines=11) @@ | ||
| 97 | * @param File $image |
|
| 98 | * @return bool |
|
| 99 | */ |
|
| 100 | function isAnimatedImage( $image ) { |
|
| 101 | $ser = $image->getMetadata(); |
|
| 102 | if ( $ser ) { |
|
| 103 | $metadata = unserialize( $ser ); |
|
| 104 | if ( $metadata['frameCount'] > 1 ) { |
|
| 105 | return true; |
|
| 106 | } |
|
| 107 | } |
|
| 108 | ||
| 109 | return false; |
|
| 110 | } |
|
| 111 | ||
| 112 | /** |
|
| 113 | * We cannot animate thumbnails that are bigger than a particular size |
|
| @@ 89-99 (lines=11) @@ | ||
| 86 | * @param File $image |
|
| 87 | * @return bool |
|
| 88 | */ |
|
| 89 | function isAnimatedImage( $image ) { |
|
| 90 | $ser = $image->getMetadata(); |
|
| 91 | if ( $ser ) { |
|
| 92 | $metadata = unserialize( $ser ); |
|
| 93 | if ( $metadata['frameCount'] > 1 ) { |
|
| 94 | return true; |
|
| 95 | } |
|
| 96 | } |
|
| 97 | ||
| 98 | return false; |
|
| 99 | } |
|
| 100 | ||
| 101 | /** |
|
| 102 | * We do not support making APNG thumbnails, so always false |
|
| @@ 270-280 (lines=11) @@ | ||
| 267 | * @param File $image |
|
| 268 | * @return bool |
|
| 269 | */ |
|
| 270 | public function isAnimatedImage( $image ) { |
|
| 271 | $ser = $image->getMetadata(); |
|
| 272 | if ( $ser ) { |
|
| 273 | $metadata = unserialize( $ser ); |
|
| 274 | if ( isset( $metadata['animated'] ) && $metadata['animated'] === true ) { |
|
| 275 | return true; |
|
| 276 | } |
|
| 277 | } |
|
| 278 | ||
| 279 | return false; |
|
| 280 | } |
|
| 281 | ||
| 282 | public function canAnimateThumbnail( $file ) { |
|
| 283 | return false; |
|