Skip to content

Commit

Permalink
fix: use setIteratorIndex instead
Browse files Browse the repository at this point in the history
  • Loading branch information
pako81 committed Feb 7, 2024
1 parent 21f2d28 commit 6b83926
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/private/Preview/Bitmap.php
Expand Up @@ -83,8 +83,9 @@ public function isAvailable(FileInfo $file) {
private function getResizedPreview($stream, $maxX, $maxY) {
$bp = new Imagick();

# using [0] as file name will tell Imagick to use the first page
$bp->readImageFile($stream, '[0]');
# setIteratorIndex(0) will make previews to be generated from the first page
$bp->readImageFile($stream);
$bp->setIteratorIndex(0);

$bp = $this->resize($bp, $maxX, $maxY);

Expand Down

0 comments on commit 6b83926

Please sign in to comment.