Page 1 of 1

Re: -border - Bug or stupidity on my part?

Posted: 2009-05-07T05:34:20-07:00
by Bonzo
I am not very impressed with your image hosting choice.

Re: -border - Bug or stupidity on my part?

Posted: 2009-05-07T05:44:30-07:00
by sinubux
I had absolutely no idea about the hosting. I'm at work and just asked a colleague for a quick image host link. I'm very sorry about that. Is there any way of removing the post so I can repost it later? Apologies, truly.

Re: -border - Bug or stupidity on my part?

Posted: 2009-05-07T05:59:43-07:00
by magick
Done.

Re: -border - Bug or stupidity on my part?

Posted: 2009-05-07T06:03:28-07:00
by sinubux
Thanks v. much indeed.

Re: -border - Bug or stupidity on my part?

Posted: 2009-05-07T07:11:32-07:00
by sinubux
Good afternoon.

Running:
  • ImageMagick 6.5.2-2
this command:
  • montage -size 150x150 -bordercolor black -border 5x5 IMG*.JPG OUT.JPG
renders this ouput:

Image

As you can see the border starts very broad then narrows along the image chain. Is this a bug or is it my error.

Thanks.

Re: -border - Bug or stupidity on my part?

Posted: 2009-05-07T09:45:31-07:00
by magick
We can reproduce the problem you posted and will have a fix in the next point release. Thanks.

Re: -border - Bug or stupidity on my part?

Posted: 2009-05-07T19:12:00-07:00
by anthony
sinubux wrote:
  • montage -size 150x150 -bordercolor black -border 5x5 IMG*.JPG OUT.JPG
Strange result. I wonder what caused it?

I will also say that it is a good idea to read in images FIRST before trying to do an operation on them.

montage -size 150x150 IMG*.JPG -bordercolor black -border 5x5 \
OUT.JPG

It may be that this will fix the problem in your current version.


NOTE -size is only a hint to the JPG library. the images that will be read into member will be larger than this (typically somewhere beterrn 150 to 512 pixels. As you did not specify a geomtry montage will default to a resize of the resulting image to abotu 128 pixel montage cells.

See the very first example in IM Examples, Montage Introduction
http://www.imagemagick.org/Usage/monatge/#montage

It is a good idea to either set the montage cell size, or trun it off using a -geometry option
just before the output image

To actually specify the final image size to use (say fit into a 100x100 pixels) in the montage you can either

resize while reading each image (good for memory)

Code: Select all

   montage -size 150x150  IMG*.JPG'[100x100]' .... -geometry +5+5 OUT.JPG
resize after read all the images using -resize

Code: Select all

   montage -size 150x150  IMG*.JPG -resize 100x100 .... -geometry +5+5 OUT.JPG
or let -geometry resize the images after you added your border (or whatever)

Code: Select all

   montage -size 150x150  IMG*.JPG  ...-border... -geometry 100x100+5+5 OUT.JPG
Again this may fix your border problem, as you are now controlling how montage resizes the images to fix the 'cell' array, rather than letting its defaults do the job.


I recommend reading the IM Examples section on Montage, so you can get what YOU want.

Re: -border - Bug or stupidity on my part?

Posted: 2009-05-07T21:53:24-07:00
by sinubux
Thanks a lot for the help. (And the fix).