Page 1 of 1

[SOLVED] Batch resize : first photo wrong

Posted: 2009-08-02T01:20:26-07:00
by cotcot
Today I discovered that I could much easier do with ImageMagick what I am doing normally with Gimp : resize photos of mixed formats to 1 format keeping the aspect ratio and filling the borders with black. Goal is to have the photos ready for making a slide show in a video editor (blender). I am working in linux (ubuntu jaunty). The command I use is :

Code: Select all

convert *.JPG -resize 1920x1080 -extent 1920x1080 -background black -gravity center videoimg*.PNG

Doing this on a batch works fine except for the first foto. There the border color is not black and is only right instead of centered. As such it is not a big problem (matter of having a dummy for the first photo)

Any idea of the reason ?
Thanks

Re: Batch resize : first photo wrong

Posted: 2009-08-02T12:18:19-07:00
by fmw42
put the settings of -background black -gravity center right after your *.jpg so that the options see them before operating.

convert *.JPG -gravity center -resize 1920x1080 -background black -extent 1920x1080 videoimg*.PNG

see

http://www.imagemagick.org/Usage/basics/#cmdline

Re: [SOLVED] Batch resize : first photo wrong

Posted: 2009-08-02T22:43:48-07:00
by cotcot
Thanks for the solution and the link. Problems is solved.