issue80:tuto_-_de_jpg_vers_pdf
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue80:tuto_-_de_jpg_vers_pdf [2014/05/03 17:33] – gsxfred | issue80:tuto_-_de_jpg_vers_pdf [2014/05/07 12:12] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | Fear not Blender fans – Nicholas will return next month. Well, assuming his employer will actually give him a day off and some free time that is... | + | **Fear not Blender fans – Nicholas will return next month. Well, assuming his employer will actually give him a day off and some free time that is... |
- | It's a common enough task, trying to convert multiple jpg files into one pdf, particularly when I don't need these to be converted with such high quality, I just want the black and white text readable. | + | It's a common enough task, trying to convert multiple jpg files into one pdf, particularly when I don't need these to be converted with such high quality, I just want the black and white text readable.** |
- | I can scan, crop, and monochrome in a graphics program, but compiling them into a single PDF booklet was always tricky. Which is how I started using ImageMagick. | + | Ne craignez rien chers fans de Blender, Nicolas sera de retour le mois prochain. Enfin, en supposant que son employeur lui donne un jour de congé et du temps libre... |
- | Je peux numériser, recadrer, mettre | + | Essayer de convertir plusieurs fichiers jpg en un seul pdf est une tâche assez basique, surtout quand je n' |
- | ImageMagick is a command-line conversion program that is capable of so many more batch operations than this - resizing, compression, format conversion - and it's available on all platforms - Linux, Windows and Mac. | + | **I can scan, crop, and monochrome in a graphics program, but compiling them into a single PDF booklet was always tricky. Which is how I started using ImageMagick.** |
- | ImageMagick est un programme | + | Je peux numériser, rogner et convertir les photos en noir et blanc à l'aide d'un logiciel |
- | Bear in mind that creating a PDF document from multiple JPEG images can take some time, and you may want to trial different settings for size and quality of output, so I suggest you make a copy of the JPEG files in a temporary folder to play around with and use Imagemagick on those – NOT on your originals. Reducing the resolution as a first step will also make things much quicker. | + | **ImageMagick is a command-line conversion program |
- | Originally I was just using the basic: | + | ImageMagick est un programme de conversion, en ligne de commande, qui est capable de faire du traitement par lot pour redimensionner, |
+ | |||
+ | **Bear in mind that creating a PDF document from multiple JPEG images can take some time, and you may want to trial different settings for size and quality of output, so I suggest you make a copy of the JPEG files in a temporary folder to play around with and use Imagemagick on those – NOT on your originals. Reducing the resolution as a first step will also make things much quicker. | ||
+ | |||
+ | Originally I was just using the basic:** | ||
+ | |||
+ | Gardez à l' | ||
+ | |||
+ | Au départ, je voulais faire les choses très simplement en utilisant | ||
convert *.jpg output.pdf and/or convert *.jpg -adjoin output.pdf | convert *.jpg output.pdf and/or convert *.jpg -adjoin output.pdf | ||
- | which works most of the time. However, there' | + | convert *.jpg output.pdf et/ou convert *.jpg -adjoin output.pdf |
+ | |||
+ | **which works most of the time. However, there' | ||
What this command does is take all the .jpg's (or format of your choice) in a folder, and convert them to a single PDF - you can name it whatever you like. | What this command does is take all the .jpg's (or format of your choice) in a folder, and convert them to a single PDF - you can name it whatever you like. | ||
You can avoid the segmentation fault bug and do the compression at the same time if you use: | You can avoid the segmentation fault bug and do the compression at the same time if you use: | ||
+ | convert *.JPG -compress Zip output.pdf** | ||
+ | |||
+ | qui fonctionne la plupart du temps. Cependant, il y a un bug dans la routine de conversion qui peut, dans certains cas, donner une erreur de segmentation lors de la conversion d'un certain nombre de fichiers JPEG vers un fichier PDF. | ||
+ | |||
+ | Cette commande prend tous les jpg (ou le format de votre choix) dans un dossier, et les convertit en un seul fichier PDF. Vous pouvez le nommer comme bon vous semble. | ||
+ | |||
+ | Vous pouvez éviter le bug d' | ||
convert *.JPG -compress Zip output.pdf | convert *.JPG -compress Zip output.pdf | ||
- | but the zip compression appears quite inefficient and results in huge file sizes. | + | **but the zip compression appears quite inefficient and results in huge file sizes. |
You could resize and lower the quality of the images using: | You could resize and lower the quality of the images using: | ||
+ | |||
+ | mogrify -resize 50% -quality 25** | ||
+ | |||
+ | mais la compression zip apparait tout à fait inefficace et génère de trop gros fichiers. | ||
+ | |||
+ | Vous pouvez redimensionner et réduire la qualité des images à l'aide de : | ||
mogrify -resize 50% -quality 25 | mogrify -resize 50% -quality 25 | ||
- | Which overwrites the originals. You can combine resizing and conversion using: | + | **Which overwrites the originals. You can combine resizing and conversion using: |
+ | convert -quality 25 -resize 50% *.jpg -adjoin output.pdf** | ||
+ | |||
+ | qui remplace les originaux. Vous pouvez combiner le redimensionnement et la conversion à l'aide de : | ||
convert -quality 25 -resize 50% *.jpg -adjoin output.pdf | convert -quality 25 -resize 50% *.jpg -adjoin output.pdf | ||
- | which works, but takes longer as you're combining batch operations. | + | **which works, but takes longer as you're combining batch operations. |
And yes, you can resizing images without overwriting the originals by specifying a new file name: | And yes, you can resizing images without overwriting the originals by specifying a new file name: | ||
Ligne 41: | Ligne 67: | ||
convert ' | convert ' | ||
- | which outputs the converted images as newfile001.jpg, | + | qui fonctionne, mais prend plus de temps car vous combinez plusieurs traitements par lots. |
+ | |||
+ | Et oui, vous pouvez redimensionner les images sans écraser les originaux en spécifiant un nouveau nom de fichier : | ||
+ | convert ' | ||
+ | |||
+ | **which outputs the converted images as newfile001.jpg, | ||
+ | |||
+ | for file in *.JPG ; do convert " | ||
+ | |||
+ | cela convertit les images et les renomme en newfile001.jpg, | ||
+ | Une autre solution, si vous souhaitez conserver le nom d' | ||
for file in *.JPG ; do convert " | for file in *.JPG ; do convert " | ||
- | This is just a sample of what Imagemagick can do if you are prepared to experiment at the command-line. | + | **This is just a sample of what Imagemagick can do if you are prepared to experiment at the command-line.** |
+ | |||
+ | Ce n'est qu'un échantillon de ce qu' |
issue80/tuto_-_de_jpg_vers_pdf.1399131207.txt.gz · Dernière modification : 2014/05/03 17:33 de gsxfred