Skip to content

Commit

Permalink
Fix PDF page image rendering issues (#1792)
Browse files Browse the repository at this point in the history
Added new CLI options to command used to extract images of PDF pages.
Added "-density 300" to increase image detail and "-alpha remove" to
fix issue where the alpha channel is rendered as black and causes
images to be illegible.
  • Loading branch information
mcantelon committed Apr 2, 2024
1 parent bcde2b5 commit 46fbed5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/model/QubitDigitalObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -2024,7 +2024,7 @@ public function explodeMultiPageAsset()

$filenameMinusExtension = preg_replace('/\.[a-zA-Z]{2,3}$/', '', $path);

$command = 'convert -quality 100 ';
$command = 'convert -density 300 -alpha remove -quality 100 ';
$command .= $path;
$command .= ' '.$filenameMinusExtension.'_%02d.'.self::THUMB_EXTENSION;
exec($command, $output, $status);
Expand Down

0 comments on commit 46fbed5

Please sign in to comment.