Retrait de la dépendance ImageMagick

This commit is contained in:
www-data 2014-06-18 08:14:02 +02:00
parent e2e5285434
commit de0a789d9e
2 changed files with 1 additions and 3 deletions

View File

@ -4,7 +4,7 @@
* A working installation of [WordPress](http://wordpress.org/) (used for user management only) * A working installation of [WordPress](http://wordpress.org/) (used for user management only)
* [gregorio](https://gna.org/projects/gregorio/) * [gregorio](https://gna.org/projects/gregorio/)
* [LuaLaTeX](http://www.tug.org/texlive/) * [LuaLaTeX](http://www.tug.org/texlive/)
* [ImageMagick](http://www.imagemagick.org/) * *([ImageMagick](http://www.imagemagick.org/) should not be necessary any more)*
* [PDFCrop](http://pdfcrop.sourceforge.net/) * [PDFCrop](http://pdfcrop.sourceforge.net/)
* [GhostScript](http://www.ghostscript.com/) * [GhostScript](http://www.ghostscript.com/)

View File

@ -180,10 +180,8 @@ function makeimgfiles($id, $tex, $suffix = '') {
fclose($f[0]); fclose($f[0]);
chdir(dirname($f[1])); chdir(dirname($f[1]));
exec('lualatex --interaction=nonstopmode '.basename($f[1])); exec('lualatex --interaction=nonstopmode '.basename($f[1]));
# exec('convert -density 300 '.substr($f[1],0,-4).'.pdf -flatten -trim '.$path.'png/'.$id.$suffix.'.png');
exec('gs -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pnggray -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r300x300 -sOutputFile='.$path.'png/'.$id.$suffix.'.png -- '.substr($f[1],0,-4).'.pdf -c quit'); exec('gs -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pnggray -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r300x300 -sOutputFile='.$path.'png/'.$id.$suffix.'.png -- '.substr($f[1],0,-4).'.pdf -c quit');
chmod($path.'png/'.$id.$suffix.'.png', 0666); chmod($path.'png/'.$id.$suffix.'.png', 0666);
# exec('convert -resize 33.333333% '.$path.'png/'.$id.$suffix.'.png '.$path.$id.$suffix.'.png');
exec('gs -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pnggray -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r100x100 -sOutputFile='.$path.$id.$suffix.'.png -- '.substr($f[1],0,-4).'.pdf -c quit'); exec('gs -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pnggray -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r100x100 -sOutputFile='.$path.$id.$suffix.'.png -- '.substr($f[1],0,-4).'.pdf -c quit');
chmod($path.$id.$suffix.'.png', 0666); chmod($path.$id.$suffix.'.png', 0666);
exec('pdfcrop '.substr($f[1],0,-4).'.pdf '.$path.'pdf/'.$id.$suffix.'.pdf'); exec('pdfcrop '.substr($f[1],0,-4).'.pdf '.$path.'pdf/'.$id.$suffix.'.pdf');