Created
December 31, 2015 21:58
-
-
Save rkrishnasanka/6d70d3081fbca71bc078 to your computer and use it in GitHub Desktop.
PDF to IMG Conversion script using imagemagick and wand
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from wand.image import Image | |
# Converting first page into JPG | |
with Image(filename="/thumbnail.pdf[0]") as img: | |
img.save(filename="/temp.jpg") | |
# Resizing this image | |
with Image(filename="/temp.jpg") as img: | |
img.resize(200, 150) | |
img.save(filename="/thumbnail_resize.jpg") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment