mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 12:41:30 +00:00
make sure the image has always the requested width
This commit is contained in:
parent
70fccdfe47
commit
a1077b5441
|
@ -99,17 +99,17 @@ class SeedDMS_Preview_Previewer {
|
||||||
case "image/jpeg":
|
case "image/jpeg":
|
||||||
case "image/jpg":
|
case "image/jpg":
|
||||||
case "image/svg+xml":
|
case "image/svg+xml":
|
||||||
$cmd = 'convert -resize '.$width.'x'.$width.' '.$file.' '.$target;
|
$cmd = 'convert -resize '.$width.'x '.$file.' '.$target;
|
||||||
break;
|
break;
|
||||||
case "application/pdf":
|
case "application/pdf":
|
||||||
case "application/postscript":
|
case "application/postscript":
|
||||||
$cmd = 'convert -density 18 -resize '.$width.'x'.$width.' '.$file.'[0] '.$target;
|
$cmd = 'convert -density 18 -resize '.$width.'x '.$file.'[0] '.$target;
|
||||||
break;
|
break;
|
||||||
case "text/plain":
|
case "text/plain":
|
||||||
$cmd = 'convert -resize '.$width.'x'.$width.' '.$file.'[0] '.$target;
|
$cmd = 'convert -resize '.$width.'x '.$file.'[0] '.$target;
|
||||||
break;
|
break;
|
||||||
case "application/x-compressed-tar":
|
case "application/x-compressed-tar":
|
||||||
$cmd = 'tar tzvf '.$file.' | convert -resize '.$width.'x'.$width.' text:-[0] '.$target;
|
$cmd = 'tar tzvf '.$file.' | convert -resize '.$width.'x text:-[0] '.$target;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if($cmd) {
|
if($cmd) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user