Page 1 of 2
convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows
Posted: 2017-03-01T02:25:10-07:00
by Tester12345
Hello,
there is a bug at convert in the append function
(both -append and +append)
The PDF results are much too high.
you can check it simply
convert flower-left.jpg flower-right.jpg +append flower-direct.pdf
-> check white space in PDF above the main pictures
the JPG append conversion is okay:
convert flower-left.jpg flower-right.jpg +append flower-direct.jpg
and also the jpg to pdf conversion...
convert flower-direct.jpg flower-direct.pdf
Tested with ImageMagick 7.0.5-0 Q16 x64 2017-02-20
on windows 10
Tester
Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows
Posted: 2017-03-01T10:09:31-07:00
by snibgo
Tester12345 wrote:The PDF results are much too high.
To help us understand the problem, please upload sample input and output files, and show the command you used. You can upload to somewhere like dropbox.com and paste the URLs here.
Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows
Posted: 2017-03-01T15:14:44-07:00
by Tester12345
I uploaded it to
http://www.share-online.biz/dl/LGTLP5MOP9
-> ImageMagick-705-Q16-bug.zip
4 files:
Source 1: flower-left.jpg
Source 2: flower-right.jpg
Target PDF with wrong dimensions: result.pdf
Target JPG with correct dimensions: result.jpg
used commandlines win10 :
convert flower-left.jpg flower-right.jpg +append result.pdf 1150x1609
-> picture has only half height (about 575 pixel and the other half is white...)
convert flower-left.jpg flower-right.jpg +append result.jpg 2300x1609
-> picture is going over full height...
(so the complete result PDF is not much too high, it have only the half height and
the main picture have only quarter height of the input pictures.)
Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows
Posted: 2017-03-01T15:21:02-07:00
by snibgo
I can't get through the captcha. (Perhaps I'm a robot, ha! I always wondered.)
Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows
Posted: 2017-03-01T15:25:09-07:00
by Tester12345
Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows
Posted: 2017-03-01T15:34:26-07:00
by snibgo
Yes, your output PDF is weird.
Making the PDF works fine for me, using "convert" with v6.9.5-3, or "magick" or "magick convert" with v7.0.3-5.
Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows
Posted: 2017-03-01T15:43:05-07:00
by Tester12345
yes, I had also an older version which were working.
I thought I needed to update to the actual release...
(that's why I opened a posting
This is working too with the actual win version 7.0.5-0 :
Code: Select all
convert jpg1 jpg2 +append intermediate-result.jpg
convert intermediate-result.jpg result.pdf
Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows
Posted: 2017-03-01T15:46:58-07:00
by snibgo
It looks like a recent bug.
Does the problem only occur when you append images together? Or does it also apply to non-appended image, eg:
Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows
Posted: 2017-03-01T16:02:23-07:00
by fmw42
I cannot get to your images. But the following works fine for me on IM 7.0.5.0 Q16 Mac OSX
Code: Select all
magick rose: logo: -background black +append tmp.pdf
Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows
Posted: 2017-03-01T16:12:50-07:00
by fmw42
I finally was able to download your images and I can reproduce the white area at the top. Your files have an xif:ExifOffset: 159, but adding -strip does not seem to avoid the white padding at the top. Using both IM 6.9.7.9 and 7.0.5.0 Q16 Mac OSX
It seems to be something about your jpg files, since I can do:
Code: Select all
magick rose: rose.jpg
magick logo: logo.jpg
magick rose.jpg logo.jpg -background black +append rose_logo.pdf
and do not get any padding at the top.
Converting each of your images separately to pdf does not show any problem. But using -append puts a large white pad on the right side in a manner similar to the white pad at the top when using +append.
Code: Select all
magick flower-left.jpg flower-right.jpg -append result.pdf
Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows
Posted: 2017-03-01T16:28:40-07:00
by fmw42
If I do the following, it seems to work
Code: Select all
magick flower-left.jpg flower-right.jpg PNG:- | magick - +append result.pdf
But replacing PNG:- with MIFF:- or TIFF:- does not work.
So it seems to be a bug in my opinion.
Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows
Posted: 2017-03-01T23:58:03-07:00
by Tester12345
fmw42 wrote: ↑2017-03-01T16:12:50-07:00
It seems to be something about your jpg files, since I can do:
Code: Select all
magick rose: rose.jpg
magick logo: logo.jpg
magick rose.jpg logo.jpg -background black +append rose_logo.pdf
and do not get any padding at the top.
Tried with wizard.png from homepage:
http://imagemagick.org/script/index.php.
Code: Select all
magick wizard.png wizard.png -background black +append wizard-2.png.pdf
same buggy result
fmw42 wrote: ↑2017-03-01T16:28:40-07:00
If I do the following, it seems to work
Code: Select all
magick flower-left.jpg flower-right.jpg PNG:- | magick - +append result.pdf
Don't work at all. Only one wizard in PDF
Code: Select all
magick wizard.jpg wizard.jpg PNG:- | magick - +append wizard-png-param.pdf
Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows
Posted: 2017-03-02T01:05:52-07:00
by fmw42
You are correct. Even this does not work properly
Code: Select all
magick wizard.png wizard.png +append wizard-png-param.pdf
So this is even more a puzzle.
Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows
Posted: 2017-03-02T02:16:03-07:00
by Tester12345
checked with both available windows versions:
ImageMagick 6.9.7-9 Q16 x64 2017-02-18
ImageMagick 7.0.5-0 Q16 x64 2017-02-20
Not working:
1-step append & JPG to PDF
Code: Select all
convert wizard.jpg wizard.jpg +append wizard_twice_from_jpg.pdf
Not working:
1-step append & PNG to PDF
Code: Select all
convert wizard.png wizard.png +append wizard_twice.pdf
Not working:
2-step append & PNG to PDF
Code: Select all
convert wizard.png wizard.png +append wizard_twice.png
convert wizard_twice.png wizard_twice_2ndpass.pdf
Working:
2-step append & JPG to PDF
Code: Select all
convert wizard.jpg wizard.jpg +append wizard_twice_from_jpg.jpg
convert wizard_twice_from_jpg.jpg wizard_twice_from_jpg_2ndpass.pdf
Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows
Posted: 2017-03-02T07:48:26-07:00
by snibgo
Tester12345 wrote:Don't work at all. Only one wizard in PDF
Code: Select all
magick wizard.jpg wizard.jpg PNG:- | magick - +append wizard-png-param.pdf
I would expect only one wizard. This is the correct behaviour.
The first magick outputs two PNG files to the pipe, one immediately after the other. The second magick reads the pipe, but ignores any data after the first PNG is finished. (Because that's how PNG works.) So the second magick has only one image.
If you used MIFF instead of PNG, you would get two images (because that's how MIFF works).