Page 2 of 2

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

Posted: 2017-03-02T08:09:00-07:00
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

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

Posted: 2017-03-02T08:14:04-07:00
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.

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

Posted: 2017-05-20T03:52:46-07:00
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

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

Posted: 2017-05-20T04:02:19-07:00
by RoadRacer
Ah,
stupid :lol:

Code: Select all

convert.exe  @List.txt  -normalize  -evaluate-sequence  mean  Out.png
works

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

Posted: 2017-05-20T04:22:26-07:00
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?

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

Posted: 2017-05-20T04:45:38-07:00
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.

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

Posted: 2017-05-20T05:25:02-07:00
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.

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

Posted: 2017-05-20T05:40:17-07:00
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.