convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Tester12345
Posts: 7
Joined: 2017-03-01T02:14:56-07:00
Authentication code: 1151

Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows

Post by Tester12345 »

snibgo wrote: 2017-03-02T07:48:26-07:00
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).
The target is to make of two images one concatenated PDF, which contains both images...
Sorry, if it didn't come clear...
Otherwise I would simply enter

Code: Select all

convert wizard.png wizard.pdf
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows

Post by snibgo »

Yes. The point I was making is that concatenating PNG (or most filetypes) in a pipe will ignore images after the first. That trick only works for MIFF, because MIFF has the useful property that two or more MIFF files can be simply concatenated to make a single MIFF file containing multiple images.
snibgo's IM pages: im.snibgo.com
User avatar
RoadRacer
Posts: 8
Joined: 2017-05-04T00:48:33-07:00
Authentication code: 1151

Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows

Post by RoadRacer »

Hy together

How does the pipe works in PowerShell?
I tryed the following (with a list of images), but it doesn't works:

Code: Select all

convert.exe  @List.txt  -normalize  miff:-  |  convert.exe  miff:-  -evaluate-sequence  mean  PipeList.png
what works is the following, but it takes a lot of time writing all images temporary at disk

Code: Select all

convert.exe  @List.txt  -normalize  xyz%04d.png
convert.exe  xyz*.png  -evaluate-sequence  mean  PipeList.png
I would be thankful for your suggestions
Windows 10 Pro (64 bit)
ImageMagick 7.0.3 Q16 (64 bit, standalone)
User avatar
RoadRacer
Posts: 8
Joined: 2017-05-04T00:48:33-07:00
Authentication code: 1151

Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows

Post by RoadRacer »

Ah,
stupid :lol:

Code: Select all

convert.exe  @List.txt  -normalize  -evaluate-sequence  mean  Out.png
works
Windows 10 Pro (64 bit)
ImageMagick 7.0.3 Q16 (64 bit, standalone)
User avatar
RoadRacer
Posts: 8
Joined: 2017-05-04T00:48:33-07:00
Authentication code: 1151

Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows

Post by RoadRacer »

OK, the last sample was strongly simplified, because I don't want to reveal to much about waht I try to develop.

The following code shows the real problem.
Instead of the "..." I have some process, but just without the "..." it should work, or not?

Code: Select all

convert.exe  Image.png[1000x1000]  -crop 20x20  ...  miff:-  |  montage.exe  miff:-  -mode concatenate  -tile  50  Output.png
Or ist the problem founded in piping results from convert.exe to montage.exe?
Windows 10 Pro (64 bit)
ImageMagick 7.0.3 Q16 (64 bit, standalone)
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows

Post by snibgo »

RoadRacer wrote:Instead of the "..." I have some process, but just without the "..." it should work
As a bash or CMD or BAT command, yes, that will work. As Powershell: I don't know.
snibgo's IM pages: im.snibgo.com
User avatar
RoadRacer
Posts: 8
Joined: 2017-05-04T00:48:33-07:00
Authentication code: 1151

Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows

Post by RoadRacer »

The "..." are some Imagemagick commands.

Now I tryed the commandline like above in BAT and that works fine!
So now I know the problem is to get the pipe-symbol "|" into the IM-commandline using PowerShell.
Thank's Snigbo!

currently I do it this way:

Code: Select all

$Pipe = '|'
convert.exe  ...  $Pipe  montage.exe  ...
Because, if I write the pipe | directly in the IM-commandline it would be interpreted by PowerShell and not by IM.

Same way works fine with parenthesis (thats why I tryed it also with the pipe):

Code: Select all

$Popen = '('
$Pclose = ')'
convert.exe  input.png  $Popen  add.png  -rotate 77  ...  $Pclose  -geometry +10+20  -composite  out.png
Next time I should try more samples in BAT to be sure that the IM-commandline works, bevore I tryed it in PS, that will help me to allocate the reason of the problems.
But in the sample with the pipe there was no error-notification neither from Imagemagick nor from PowerShell.
Windows 10 Pro (64 bit)
ImageMagick 7.0.3 Q16 (64 bit, standalone)
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: convert +append from jpg to pdf -> pdf got too high / ImageMagick 7.0.5-0 Q16 x64 Windows

Post by snibgo »

I don't use Powershell, but a quick google suggests that "cmd" in Powershell (escaping special characters, which might include | ) may be the solution.
snibgo's IM pages: im.snibgo.com
Post Reply