convert pdf generates corrupt image
Posted: 2017-06-18T02:31:57-07:00
I'm using ImageMagick with a docker container. My image looks like this.
FROM alpine:latest
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
RUN apk --no-cache add \
imagemagick \
ghostscript \
--update curl
CMD [ "echo", "Use one of the following commands [ animate | compare | composite | conjure | convert | display | identify | import | mogrify | montage | stream ]" ]
The version of ImageMagick is:
Version: ImageMagick 7.0.5-10 Q16 x86_64 2017-06-05 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher HDRI Modules
Delegates (built-in): fontconfig freetype gslib jng jpeg lcms ltdl png ps tiff webp xml zlib
When I run the following command ImageMagick produces a corrupt image.
docker run imagemagick convert -verbose http://www.pdf995.com/samples/pdf.pdf[0] - > foo.jpg
/tmp/magick-1-JjeGtapAEMe1 PNG 612x792 612x792+0+0 8-bit sRGB 60787B 0.020u 0:00.020
/tmp/magick-1et9Ro9BFOGOh PDF 612x792 612x792+0+0 16-bit sRGB 60787B 0.000u 0:00.000
http://www.pdf995.com/samples/pdf.pdf[0]=>pdf.pdf PDF 612x792 612x792+0+0 16-bit sRGB 60787B 0.000u 0:00.000
When I try to open the image it produces I get an error that it's corrupt or damaged?
This is a link to the converted image: https://d26dzxoao6i3hh.cloudfront.net/i ... 3I/foo.jpg
FROM alpine:latest
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
RUN apk --no-cache add \
imagemagick \
ghostscript \
--update curl
CMD [ "echo", "Use one of the following commands [ animate | compare | composite | conjure | convert | display | identify | import | mogrify | montage | stream ]" ]
The version of ImageMagick is:
Version: ImageMagick 7.0.5-10 Q16 x86_64 2017-06-05 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher HDRI Modules
Delegates (built-in): fontconfig freetype gslib jng jpeg lcms ltdl png ps tiff webp xml zlib
When I run the following command ImageMagick produces a corrupt image.
docker run imagemagick convert -verbose http://www.pdf995.com/samples/pdf.pdf[0] - > foo.jpg
/tmp/magick-1-JjeGtapAEMe1 PNG 612x792 612x792+0+0 8-bit sRGB 60787B 0.020u 0:00.020
/tmp/magick-1et9Ro9BFOGOh PDF 612x792 612x792+0+0 16-bit sRGB 60787B 0.000u 0:00.000
http://www.pdf995.com/samples/pdf.pdf[0]=>pdf.pdf PDF 612x792 612x792+0+0 16-bit sRGB 60787B 0.000u 0:00.000
When I try to open the image it produces I get an error that it's corrupt or damaged?
This is a link to the converted image: https://d26dzxoao6i3hh.cloudfront.net/i ... 3I/foo.jpg