>
sudo apt-get install imagemagick
ImageMagick
(Use image instead of the specific file name.)
With the convert image. PDF image. JPG code> can translate directly, but the image resolution is not high
with the following command transformation effect is better
convert -verbose -colorspace RGB -resize 1800 -interlace none -density 300 -quality 100 image.pdf image.jpg
(-Resize the following coefficient to adjust the width of the image in pixels, and the height to scale)
If the following error occurs
convert: not authorized `grade.pdf' @ error/constitute.c/ReadImage/412.
convert: no images defined `*.jpg' @ error/convert.c/ConvertImageCommand/3210.
Because the ImageMagick policy. XML file does not give "read and write PDF files" permission by default.
Open the policy-.xml file
sudo vi /etc/ImageMagick-6/policy.xml
< policy domain="coder" rights="none" pattern="PDF" /> code>
in the "none" code>
instead "read/write" code>
In addition, a few simple features of ImageMagick are also posted below
Pictures are made into GIFs
convert *.jpg images.gif
Where * is the wildcard, *. JPG means all the path under the JPG file
in addition to the image format in JPG, can also be PNG and other common image format
Modify image size
Take a single picture for example
convert 'image.jpg' -resize 1200 image2.jpg
(1200 means that the width becomes 1200 pixels, and the height varies proportionally)
Take several pictures for example
convert '*.jpg' -resize 1200 %03d.jpg
(can also be converted to other image format)
(% 3 d. The JPG said to give the picture of the new generation in 000. The JPG, 001 JPG rule named)
(if written image % 3 d. The JPG, said to a new generation of picture by image000. The JPG, image001. The law of the JPG)
This can also be written:
convert '*.jpg[1200]' %03d.jpg
Read More:
- JavaScript to achieve image rotation effect
- PHP uses timthumb to generate thumbnails
- Tainted canvases may not be exported
- Visionox shows app development record
- Abnormal crash of APP startup — pointer being free was not allocated * * set a breakpoint in malloc_ error_ break to debug
- Tensorflow image random_ There seems to be something wrong with the shift function
- Python data cleaning — delete failed images__ Simple version
- Two deformation methods of tensorflow image
- How to Use Subfigure in Latex
- Simple license plate recognition based on Halcon
- Image proxy settings Flash + JavaScript
- The image operation of MATLAB — every detail operation of colorbar
- Uncaught typeerror: cannot set property ‘of null error resolution
- VBoxManage.exe: error: Resize hard disk operation for this format is not implemented yet!
- An error is displayed when virtualbox uses modifyhd command to expand capacity: Resize medium operation for this format is not implemented yet
- Vs2015 OpenGL environment configuration
- Python opencv (3) get image size
- JS error: permission denied to access property ‘document’— document.domain -The same source strategy of JavaScript
- Get picture captcha with Python + Chrome
- Not a PNG file.. solution