Page 1 of 1

Merge Image with ImageMagik

Posted: 2008-04-22T12:53:31-07:00
by Uffa
Hi!
Sorry for my bad english.
I have the following problem with imagemagik.
I have 2 pdf file with an image,
I extract half image from the first and half image from the second,
with the following command:

"C:\Programmi\ImageMagick-6.3.7-Q16\convert -density 300x300 -crop 100x50% page1.pdf image1.pdf"

and then I merge two image in one pdf file with the following command:

"C:\Programmi\ImageMagick-6.3.7-Q16\montage image1.bmp image2.bmp -tile x2 -geo
metry 2496 unito.pdf"

My problem is:
Why the final file is heavier then original file?
For example the first and second file is 60 kb and the final file is 300 kb.
Where i wrong?


Thank you!

Re: Merge Image with ImageMagik

Posted: 2008-04-22T20:36:48-07:00
by fmw42
I don't know enough about PDF files, but I see a couple of problems.

1) The convert syntax is usually to have the input image after convert.

convert input options output

I am not sure about where you need to put -density with PDFs, but you could try either:

convert page1.pdf -density 300x300 -crop 100x50% image1.pdf
or
convert -density 300x300 page1.pdf -crop 100x50% image1.pdf
or
convert page1.pdf -crop 100x50% -density 300x300 image1.pdf

Depending upon which image you are trying to set the density

2) you are referencing image1.bmp and image2.bmp in your montage step. Do you really mean .bmp or .pdf? Or is your first command line meaning to convert to .bmp?

3) you could use -append or + append in place of montage

Re: Merge Image with ImageMagik

Posted: 2008-05-02T09:11:52-07:00
by Uffa
It doesn't work,
the dimension still the same